public void reportShow()
        {
            panel3.Controls.Clear();

            DataTable dt = new PatientReportManager().GetAllPatientStatus(dtFrom.Value, dtTo.Value);

            aReportMethod.aReportForm       = new ReportForm();
            aReportMethod.aSource.Value     = dt;
            aReportMethod._reportParameters = new List <ReportParameter>
            {
                //new ReportParameter("Company", aReportMethod.Company),
                //new ReportParameter("Address", aReportMethod.Address),
                //new ReportParameter("FromDate", dateTimeFromDate.Text),
                // new ReportParameter("ToDate", dateTimeToDate.Text),
                //new ReportParameter("ReportName", lblReportName.Text),
            };

            aReportMethod.ReportMethods("GHospital_Care.Report.rptDailyPatientStatus.rdlc", aReportMethod.aSource, "DailyPatientStatus", aReportMethod._reportParameters);


            aReportMethod.aReportForm.MdiParent = this.MdiParent;



            aReportMethod.aReportForm.FormBorderStyle = FormBorderStyle.None; aReportMethod.aReportForm.TopLevel = false; aReportMethod.aReportForm.WindowState = FormWindowState.Maximized;


            panel3.Controls.Add(aReportMethod.aReportForm);
            aReportMethod.aReportForm.Show();
        }
Ejemplo n.º 2
0
        private void btnPrint_Click(object sender, EventArgs e)
        {
            string    VchNo = gridViewPatientAmount.GetFocusedRowCellValue("VoucherNo").ToString();
            DataTable dt    = new DataTable();

            dt = amountManager.CollectionReport(VchNo);
            aReportMethod.aSource.Value = dt;
            aReportMethod.aReportForm   = new ReportForm();
            //aStockTransfer.FormClosed += All_FormClosed;
            aReportMethod._reportParameters = new List <ReportParameter>
            {
                new ReportParameter("Company", aReportMethod.Company),
                new ReportParameter("Address", aReportMethod.Address),
                //new ReportParameter("FromDate", dateTimeFromDate.Text),
                // new ReportParameter("ToDate", dateTimeToDate.Text),
                //new ReportParameter("ReportName", lblReportName.Text),
            };

            aReportMethod.ReportMethods("GHospital_Care.Report.rptMoneyReceipt.rdlc", aReportMethod.aSource, "DataSet1", aReportMethod._reportParameters);
            aReportMethod.aReportForm.MdiParent   = this.MdiParent;
            aReportMethod.aReportForm.WindowState = FormWindowState.Maximized;
            aReportMethod.aReportForm.Show();
        }