public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { RoomUtilizationReport rpt = new RoomUtilizationReport(); rpt.Site = this.Site; return(rpt); }
private void RoomUtilizationReportViewer_Load(object sender, EventArgs e) { RoomUtilizationReport aRoomUtilizationReport = new RoomUtilizationReport(); try { // instatiate the dataset and the table adapters roomUtilizationDataset = new MVHRoomUtilizationDataSet(); roomTableAdapter = new MVHRoomUtilizationDataSetTableAdapters.spRoomUtilizationReportTableAdapter(); //physicianTableAdapter = new MVCHDataSetTableAdapters.PhysicianTableAdapter(); // fill the dataset using via the two table adapters // fill with customers and invoices roomTableAdapter.Fill(roomUtilizationDataset.spRoomUtilizationReport); // physicianTableAdapter.Fill(patientPhysicianDataset.Physician); // assign the filled dataset as the data source for the report aRoomUtilizationReport.SetDataSource(roomUtilizationDataset); // set up the report viewer object on the form to show runtime report object RoomUtilizationReportViewer.ReportSource = aRoomUtilizationReport; } // catch any exception thrwon during data object instantiation or report generation // display the exception message catch (Exception dataException) { MessageBox.Show("Data Error encounterd: " + dataException.Message.ToString()); } }