private void PrintPreview(bool Privew) { if (rbCityName.Checked == false && rbAll.Checked == false) { mem.branch.BranchName = cbxbranches.Text.Trim(); } if (rbBranchName.Checked == false && rbAll.Checked == false) { mem.City.CityName = cbxbranches.Text.Trim(); } if (rbCityName.Checked == false && rbBranchName.Checked == false) { rbAll.Checked = true; } ds = new MembershipBLL().GetData(mem, rbBranchName.Checked, rbCityName.Checked, rbAll.Checked); crp.SetDataSource(ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { if (cbxMemberName.Text == "" && rbAll.Checked == false) { MessageBox.Show("Plz Select AnyOne"); } else { string fromdate = ""; string todate = ""; fromdate = dtpFromDate.Value.Date.ToString(); todate = dtpToDate.Value.Date.ToString(); mem.DonorName = cbxMemberName.Text.Trim(); ds = new DonorBLL().GetDonorCollectionData(mem, fromdate, todate, rbAll.Checked); crp.SetDataSource(ds); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } } }
private void btnViewreport_Click(object sender, EventArgs e) { int producttype = 0; if (comCategory.SelectedValue.ToString() != "-1") { producttype = int.Parse(comCategory.SelectedValue.ToString()); } SqlParameter rpproducttype = new SqlParameter(); rpproducttype.ParameterName = "producttype"; rpproducttype.Value = producttype; sqlParams.Clear(); sqlParams.Add(rpproducttype); DataSet _rDataSet = null; if (_PPrice) { _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spProductPriceList"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptProductPriceList))); } else { _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spProductList"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptProductList))); } FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void PrintPreview(bool Privew) { if (rbCityName.Checked == false && rbAll.Checked == false) { d.branch.BranchName = cbxbranches.Text.Trim(); } if (rbBranchName.Checked == false && rbAll.Checked == false) { d.City.CityName = cbxbranches.Text.Trim(); } if (rbCityName.Checked == false && rbBranchName.Checked == false) { rbAll.Checked = true; } //ds = new DonorBLL().GetData(d, rbBranchName.Checked, rbCityName.Checked, rbAll.Checked); ds = new DonorBLL().GetData(d, rbBranchName.Checked, rbCityName.Checked, rbAll.Checked, true, dtpFrom.Value.Date.ToString(), dtpTo.Value.Date.ToString(), true); //crp.SetDataSource(ds); FrmReportViewer frmViewer = new FrmReportViewer(); //frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { //frmViewer.crystalReportViewer1.RefreshReport(); //frmViewer.crystalReportViewer1.PrintReport(); } }
private void btnviewreport_Click(object sender, EventArgs e) { if (comMethodologey.Text == MethodologyEnum.SERVICE_STATISTIC.ToString() || comMethodologey.Text == MethodologyEnum.CONSUMPTION.ToString()) { ReportParameter finfoparam = new ReportParameter("forecastid", DforecastId.ToString()); param.Add(finfoparam); ReportParameter siteid = new ReportParameter("siteid", "0"); param.Add(siteid); ReportParameter catid = new ReportParameter("catid", "0"); param.Add(catid); ReportParameter protypeid = new ReportParameter("protypeid", "0"); param.Add(protypeid); if (comMethodologey.Text == MethodologyEnum.SERVICE_STATISTIC.ToString()) { ReportParameter testareaId = new ReportParameter("testareaId", "0"); param.Add(testareaId); } } else { ReportParameter pDForecastId = new ReportParameter("ForecastId", DforecastId.ToString()); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "ForecastId"; rpMForecastId.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); } DataSet _rDataSet = new DataSet(); if (comMethodologey.Text == MethodologyEnum.DEMOGRAPHIC.ToString()) { _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spMorbiditySupplyProcuremnetForecast"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.Dforcastcostsummary))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } else if (comMethodologey.Text == MethodologyEnum.SERVICE_STATISTIC.ToString() || comMethodologey.Text == MethodologyEnum.CONSUMPTION.ToString()) { FrmReportViewer frm = new FrmReportViewer(); if (comMethodologey.Text == MethodologyEnum.CONSUMPTION.ToString()) { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptConsumptionCostSummary))); frm = new FrmReportViewer(filinfo, FillFinfoReportDataSet(), FillDetailReportDataSet(), param); } else { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptServiceCostSummary))); frm = new FrmReportViewer(filinfo, FillReportDataSet(), FillFinfoReportDataSet(), FillDetailReportDataSet(), FillServiceDetailReportDataSet(), param); } frm.ShowDialog(); } }
private void PrintPreviewInjection(bool preview) { string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); rptNewCurrentStock crp = new rptNewCurrentStock(); DsCurrentStock.CurrentStockDataTable prt = new LabTestBLL().GetCurrentStock(rbLabTestnMedicines.Checked, rbWithoutLabTest.Checked, rbLabTests.Checked); crp.SetDataSource((DataTable)prt); if (rbLabTestnMedicines.Checked == true) { crp.SetParameterValue("Type", "LabTests&Medicines"); } else if (rbWithoutLabTest.Checked == true) { crp.SetParameterValue("Type", "Medicines "); } else if (rbLabTests.Checked == true) { crp.SetParameterValue("Type", "LabTests"); } FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; //crp.SetParameterValue("Name", BranchName); //crp.SetParameterValue("Address", BranchAddress); if (preview) { frmViewer.ShowDialog(); } else { //frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void btnViewreport_Click(object sender, EventArgs e) { int testingarea = 0; if (comTestarea.SelectedValue.ToString() != "-1") { testingarea = int.Parse(comTestarea.SelectedValue.ToString()); } SqlParameter rptestingarea = new SqlParameter(); rptestingarea.ParameterName = "testingarea"; rptestingarea.Value = testingarea; sqlParams.Clear(); sqlParams.Add(rptestingarea); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spTestList"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptTestList))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void PrintPreview(bool Privew) { string fromdate = ""; string todate = ""; fromdate = dtpFromDate.Value.Date.ToString(); todate = dtpToDate.Value.Date.ToString(); if (rdoUnpaid.Checked) { fromdate = dtpFromDate.Value.ToString("MMM-yyyy"); } mem.Member = (Membership)cbxMemberName.SelectedItem; mem.MemberName = cbxMemberName.Text.Trim(); ds = new MembershipBLL().GetMemberCollectionData(mem, fromdate, todate, rdoPaid.Checked); crp.SetDataSource(ds); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { string fromdate = ""; string todate = ""; fromdate = dtpFromDate.Value.Date.ToString(); todate = dtpToDate.Value.Date.ToString(); mem.MemberName = cbxMemberName.Text.Trim(); ds = new MembershipBLL().GetMemberCollectionData(mem, fromdate, todate, true); crp.SetDataSource(ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void btnviewreport_Click(object sender, EventArgs e) { int SforecastId = -1; int CforecastId = -1; int DforecastId = -1; if (cobservice.SelectedValue.ToString() != "-1") { SforecastId = int.Parse(cobservice.SelectedValue.ToString()); } if (cobconsumption.SelectedValue.ToString() != "-1") { CforecastId = int.Parse(cobconsumption.SelectedValue.ToString()); } if (cobdemography.SelectedValue.ToString() != "-1") { DforecastId = int.Parse(cobdemography.SelectedValue.ToString()); } ReportParameter pSForecastId = new ReportParameter("SForecastId", SforecastId.ToString()); ReportParameter pCForecastId = new ReportParameter("CForecastId", CforecastId.ToString()); ReportParameter pDForecastId = new ReportParameter("MForecastId", DforecastId.ToString()); param.Add(pSForecastId); param.Add(pCForecastId); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "MForecastId"; rpMForecastId.Value = DforecastId; SqlParameter rpSForecastId = new SqlParameter(); rpSForecastId.ParameterName = "SForecastId"; rpSForecastId.Value = SforecastId; SqlParameter rpCForecastId = new SqlParameter(); rpCForecastId.ParameterName = "CForecastId"; rpCForecastId.Value = CforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); sqlParams.Add(rpSForecastId); sqlParams.Add(rpCForecastId); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spGetForecastComparision"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.forecastcomparision))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void printToolStripButton_Click(object sender, EventArgs e) { var frm = new FrmReportViewer { WindowState = FormWindowState.Normal }; frm.OpenDataSet(bindingSourceEnumerable, false); frm.Show(); }
private void PrintPreview(bool Privew) { d.FundType = Mycbx.Text.Trim(); fromdate = dtpfromDate.Value.Date.ToString(); todate = dtpTodate.Value.Date.ToString(); //else if (rbDateWise.Checked == true) //{ // fromdate = dtpfromDate.Value.Date.ToString(); // todate = dtpTodate.Value.Date.ToString(); //} //else //{ // rbAll.Checked = true; // fromdate = dtpfromDate.Value.Date.ToString(); // todate = dtpTodate.Value.Date.ToString(); //} ds = new DonorBLL().GetDonorAndMemberCollection(d, rbAll.Checked, rbDonationtype.Checked, fromdate, todate); crp.SetDataSource(ds); if (rbDonationtype.Checked == true) { crp.SetParameterValue("DType", Mycbx.Text); crp.SetParameterValue("FromDate", dtpfromDate.Value.Date.ToString("dd/MM/yyyy")); crp.SetParameterValue("ToDate", dtpTodate.Value.Date.ToString("dd/MM/yyyy")); } else if (rbAll.Checked == true) { crp.SetParameterValue("DType", "All Donations"); crp.SetParameterValue("FromDate", "Start"); crp.SetParameterValue("ToDate", "Till Now"); } string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void btnviewreport_Click(object sender, EventArgs e) { try { if (_parentId == 3) { _mforecast = LqtUtil.GetComboBoxValue <MorbidityForecast>(cobforecast); LoadReport(_subreportId); } else { FileInfo filinfo = null; _finfo = LqtUtil.GetComboBoxValue <ForecastInfo>(cobforecast); List <ReportParameter> param = new List <ReportParameter>(); ReportParameter finfo = new ReportParameter("ForecastId", _finfo.Id.ToString()); param.Add(finfo); FillReportDataSet(); if (cobreporttype.SelectedIndex == 0) { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ServiceQSummary))); } else { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.FullQSummary))); } _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; // Close(); frmRV.ShowDialog(); } } catch (Exception ex) { new FrmShowError(new ExceptionStatus() { message = "", ex = ex }).ShowDialog(); } }
private void PrintPreview(bool Privew) { ObjLt = new LabTest(); if (cbxMedicines.Text.Length > 0) { ObjLt.LabTestId = ((LabTest)(cbxMedicines.SelectedItem)).LabTestId; } ds = new LabTestBLL().GetIssuedMedPur(rbAll.Checked, rbPurchase.Checked, rbRetaiReport.Checked, ObjLt, dtpfromDate.Value.Date, dtpTodate.Value.Date); string SummaryType = ""; string From = ""; string TO = ""; if (rbPurchase.Checked == true && rbAll.Checked == false) { SummaryType = "Purchase Price"; From = dtpfromDate.Value.Date.ToString(); TO = dtpTodate.Value.Date.ToString(); } else if (rbRetaiReport.Checked == true && rbAll.Checked == false) { SummaryType = "Retail Price"; From = dtpfromDate.Value.Date.ToString(); TO = dtpTodate.Value.Date.ToString(); } else if (rbAll.Checked == true && rbRetaiReport.Checked == false && rbPurchase.Checked == false) { SummaryType = "Purchase&Retail"; From = "Start"; TO = "Till Now"; } //else if (rbAll.Checked == true && rbPurchase.Checked == true) // SummaryType = "Purchase Price"; //else if (rbAll.Checked == true && rbRetaiReport.Checked == true) // SummaryType = "Retail Price"; crp.SetDataSource((DataTable)ds); crp.SetParameterValue("SummaryType", SummaryType); crp.SetParameterValue("From", From); crp.SetParameterValue("TO", TO); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { string fromdate = ""; string todate = ""; if (rbCityName.Checked == true) { d.branch.BranchName = cbxbranches.Text.Trim(); } else if (rbBranchName.Checked == true) { d.City.CityName = cbxbranches.Text.Trim(); } else if (rbDonationtype.Checked == true) { d.FundType = cbxbranches.Text.Trim(); } else if (rbDateWise.Checked == true) { fromdate = dtpfromDate.Value.Date.ToString(); todate = dtpTodate.Value.Date.ToString(); } else { rbAll.Checked = true; } ds = new DonorBLL().GetData(d, rbBranchName.Checked, rbCityName.Checked, rbAll.Checked, rbDonationtype.Checked, fromdate, todate, rbDateWise.Checked); crp.SetDataSource(ds); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { if (rbBranchName.Checked == true) { mem.branch.BranchName = cbxbranches.Text.Trim(); } else if (rbCityName.Checked == true) { mem.City.CityName = cbxbranches.Text.Trim(); } else if (rbAll.Checked == true) { rbAll.Checked = true; } else if (rbCounsil.Checked == true) { mem.Counsil.Add((Counsil)cbxbranches.SelectedItem); } else if (rbcommitte.Checked == true) { mem.Committe.Add((Committe)this.cbxbranches.SelectedItem); } else if (rbBloodgroup.Checked == true) { mem.BloodGroup = this.cbxbranches.Text.Trim(); } ds = new MembershipBLL().GetData(mem, rbBranchName.Checked, rbCityName.Checked, rbAll.Checked, rbBloodgroup.Checked, rbCounsil.Checked, rbcommitte.Checked); crp.SetDataSource(ds); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void btnviewreport_Click(object sender, EventArgs e) { int noofsite = 0; string logic = string.Empty; if (chknoofsite.Checked) { if (txtnoofsite.Text != string.Empty) { noofsite = int.Parse(txtnoofsite.Text); } if (comlogic.Text != string.Empty) { logic = comlogic.Text; } } SqlParameter rpNoofsite = new SqlParameter(); rpNoofsite.ParameterName = "noofsite"; rpNoofsite.Value = noofsite; SqlParameter rplogic = new SqlParameter(); rplogic.ParameterName = "logic"; rplogic.Value = logic; sqlParams.Clear(); sqlParams.Add(rpNoofsite); sqlParams.Add(rplogic); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spRegionList"); if (chknoofsite.Checked) { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptRegionWithSiteCount))); } else { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptRegion))); } FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void btnViewreport_Click(object sender, EventArgs e) { int region = 0; int category = 0; if (comRegion.SelectedValue.ToString() != "-1") { region = int.Parse(comRegion.SelectedValue.ToString()); } if (comCategory.SelectedValue.ToString() != "-1") { category = int.Parse(comCategory.SelectedValue.ToString()); } SqlParameter rpregion = new SqlParameter(); rpregion.ParameterName = "region"; rpregion.Value = region; SqlParameter rpcategory = new SqlParameter(); rpcategory.ParameterName = "category"; rpcategory.Value = category; sqlParams.Clear(); sqlParams.Add(rpregion); sqlParams.Add(rpcategory); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spSiteList"); if (chkworkingday.Checked) { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptSitewithworkingdays))); } else { filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.rptSite))); } FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
private void PrintPreview(bool Privew) { DSIssueBill.DTIssueBillDataTable ds = new LabTestBLL().PrintRecMedBill(r); crp.SetDataSource((DataTable)ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { string fromdate = ""; string todate = ""; if (rbselectDonors.Checked == true) { d.DonorName = cbxReference.Text.Trim(); fromdate = dtpFromDate.Value.Date.ToString(); todate = dtpToDate.Value.Date.ToString(); } else if (rbselectMembers.Checked == true) { m.MemberName = cbxReference.Text.Trim(); fromdate = dtpFromDate.Value.Date.ToString(); todate = dtpToDate.Value.Date.ToString(); } ds = new DonorBLL().GetRefrenceCollection(rbselectDonors.Checked, rbselectMembers.Checked, d, m, fromdate, todate); crp.SetDataSource(ds); crp.SetParameterValue("RefrenceBy", cbxReference.Text); crp.SetParameterValue("FromDate", dtpFromDate.Value.Date); crp.SetParameterValue("ToDate", dtpToDate.Value.Date); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Preview) { br.City.CityName = cbxCity.Text.Trim(); ds = new BranchBLL().GetData(br); crp.SetDataSource(ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Preview) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { string fromdate = ""; string todate = ""; if (rbDonationtype.Checked == true) { d.FundType = Mycbx.Text.Trim(); fromdate = dtpfromDate.Value.Date.ToString(); todate = dtpTodate.Value.Date.ToString(); } //else if (rbDateWise.Checked == true) //{ // fromdate = dtpfromDate.Value.Date.ToString(); // todate = dtpTodate.Value.Date.ToString(); //} else { rbAll.Checked = true; fromdate = dtpfromDate.Value.Date.ToString(); todate = dtpTodate.Value.Date.ToString(); } ds = new DonorBLL().GetDonorAndMember(d, rbAll.Checked, rbDonationtype.Checked, fromdate, todate); crp.SetDataSource(ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void button7_Click(object sender, EventArgs e) { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillReportDataSetch(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ChemistryNumberofTestForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; Close(); frmRV.ShowDialog(); }
public void PrintPreview(bool Preview) { DateTime From = Convert.ToDateTime(dtpfromDate.Value.Date.ToShortDateString()); DateTime To = Convert.ToDateTime(dtpTodate.Value.Date.ToShortDateString()); ds = new LabTestBLL().GetItemLedger(From, To, cbxLabTest.Text.ToString().Trim()); crp.SetDataSource(ds); if (cbxLabTest.Text.Length > 0) { crp.SetParameterValue("FromDate", dtpfromDate.Value.Date.ToString("dd/MM/yyyy")); crp.SetParameterValue("ToDate", dtpTodate.Value.Date.ToString("dd/MM/yyyy")); crp.SetParameterValue("ItemName", (cbxLabTest.Text.ToString().Trim())); } else { crp.SetParameterValue("FromDate", "Start"); crp.SetParameterValue("ToDate", "Till Now"); crp.SetParameterValue("ItemName", "Entire Stock"); } string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Preview) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Preview) { ds = new LabTestBLL().GetListOfMed(); crp.SetDataSource(ds); string BranchName = ConfigurationManager.AppSettings["Name"].ToString(); string BranchAddress = ConfigurationManager.AppSettings["Address"].ToString(); crp.SetParameterValue("Name", BranchName); crp.SetParameterValue("Address", BranchAddress); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Preview) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void PrintPreview(bool Privew) { string fromdate = ""; string todate = ""; if (rbselectDonors.Checked == true) { d.DonorName = cbxReference.Text.Trim(); //fromdate = dtpfromDate.Value.Date.ToString(); //todate = dtpTodate.Value.Date.ToString(); } else if (rbselectMembers.Checked == true) { m.MemberName = cbxReference.Text.Trim(); //fromdate = dtpfromDate.Value.Date.ToString(); //todate = dtpTodate.Value.Date.ToString(); } ds = new DonorBLL().GetRefrenceCollection(rbselectDonors.Checked, rbselectMembers.Checked, d, m, fromdate, todate); crp.SetDataSource(ds); FrmReportViewer frmViewer = new FrmReportViewer(); frmViewer.crystalReportViewer1.ReportSource = crp; if (Privew) { frmViewer.ShowDialog(); } else { frmViewer.crystalReportViewer1.RefreshReport(); frmViewer.crystalReportViewer1.PrintReport(); } }
private void btnviewreport_Click(object sender, EventArgs e) { int DforecastId = 0; if (cobdemography.SelectedValue.ToString() != "-1") { DforecastId = int.Parse(cobdemography.SelectedValue.ToString()); } ReportParameter pDForecastId = new ReportParameter("ForecastId", DforecastId.ToString()); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "ForecastId"; rpMForecastId.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spGetForecastNoofPatientSummary"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.forcastpatientsummarywithgraph))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }
public void LoadReport(int reportId) { if (reportId == 0)//supply Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillsupplyForecastDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.MorbiditySupplyForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 1)//supply procurement Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillsupplyprocurementDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.MorbiditySupplyProcurement))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 2)//Patinet Distribution Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillPatinetDistributionDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.PatientNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 3)//Cd4 hivrapid Forecast Report { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillCD4HIVRapidDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.CD4TestNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, _rDataSet2, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 4)//chemistry Other { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillchemistryOtherDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.ChemistryNumberofTestForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } if (reportId == 5)//hematology viral { FileInfo filinfo = null; List <ReportParameter> param = new List <ReportParameter>(); //ReportParameter finfo = new ReportParameter("ForecastId", "1"); //param.Add(finfo); FillhematologyviralDataSet(); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.HemaandViralTestNumberForecast))); _fileToLoad = filinfo; FrmReportViewer frmRV = new FrmReportViewer(_fileToLoad, _rDataSet, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); } }
private void button1_Click(object sender, EventArgs e) { // Noogen.Validation.ValidationRule vr = new Noogen.Validation.ValidationRule(); // vr.CustomValidationMethod += // new Noogen.Validation.CustomValidationEventHandler(vr_CustomValidationMethod); // vr.CustomErrorMessage = MessageUtils.GetMessage("W0002","bbbbb","ccccc"); // this.validationProvider1.SetValidationRule(this.dateTimePicker1, vr); // // // if (!this.validationProvider1.Validate()) // { // IList<MessageVo> re = this.validationProvider1.ValidationMessages( // true); // this.baseform.msgwindow.Messagelist = re; // this.baseform.msgwindow.ShowMessage(); // // return; // } // else // { // this.validationProvider1.ValidationMessages(false); // baseform.msgwindow.Hide(); // } log.Debug("OK click"); try { ResourceManager rm = new System.Resources.ResourceManager("Com.GainWinSoft.ERP.ReportCenter.Rdlc.RdlcPmMs", Assembly.GetAssembly(typeof(FrmReportViewer))); FrmReportViewer frmReportViewr = new FrmReportViewer(this.baseform.Parentdockpanel); //ResourceManager fr = new ResourceManager(typeof(FrmMaterialEdit)); frmReportViewr.DockTitle = rm.GetString("ReportName"); frmReportViewr.Reportname = "Com.GainWinSoft.ERP.ReportCenter.Rdlc.RdlcPmMs.rdlc"; frmReportViewr.DatasetName = "DataSetPmMs_TPmMs"; frmReportViewr.Condition = null; frmReportViewr.ShowContent(false); // //通过Windsor组件容器获得Action的实例。 // //IAction_FrmCompany a = ComponentLocator.Instance().Resolve<IAction_FrmCompany>(); // //ITDescMsDao d = ComponentLocator.Instance().Resolve<ITDescMsDao>(); // //IList<TDescMs> l = d.GetTDescMsList("63", "zh-CN"); // //StoredProcedureExecDaoOracleImp dd = new StoredProcedureExecDaoOracleImp(); // IStoredProcedureExecDao dd = ComponentLocator.Instance().Resolve<IStoredProcedureExecDao>(); // // StoredProcedureCondition condition = new StoredProcedureCondition(); // condition.AddCondition("I_JOURNAL_NO", 1000002,ParameterDirection.Input); // condition.AddCondition("I_COMPANY_CD", "00", ParameterDirection.Input); // condition.AddCondition("I_ERR_CD", DbType.String,6,ParameterDirection.Output); // condition.AddCondition("I_ERR_ITEM", DbType.String,100,ParameterDirection.Output); // decimal returnvalue = dd.StoredProcedureExecReturnNumber("PE0025P.TOP_RTN", condition); // string ierrcd = (string)condition.GetStoredProcedureOutputValue("I_ERR_CD"); // string ierritem = (string)condition.GetStoredProcedureOutputValue("I_ERR_ITEM"); // // if (returnvalue != 0) // { // IList<MessageVo> msglist = new List<MessageVo>(); // MessageVo vo = new MessageVo(); // vo.MessageType = "Warning"; // vo.ResultMessage = MessageUtils.GetMessage("S0001", ierrcd, ierritem); // msglist.Add(vo); // this.baseform.msgwindow.Messagelist = msglist; // this.baseform.msgwindow.ShowMessage(); // } // // ICTPmMsNoARDao d = ComponentLocator.Instance().Resolve<ICTPmMsNoARDao>(); // SearchCondition condition = new SearchCondition(); // condition.AddCondition("T_PM_MS.I_ITEM_ENTRY_CLS","I_ITEM_ENTRY_CLS","00",SqlOperator.Equal); // //condition.AddCondition("T_PM_MS.I_FAC_CD","F // // IList<CTPmMsNoAR> l = d.GetPmMsDetail(condition); // //调用Action类的方法 // MessageBox.Show(l.Count.ToString()); // //NewMethod(); } catch (ApplicationException ex) { MessageBox.Show(ex.Message, "", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void btnviewreport_Click(object sender, EventArgs e) { int DforecastId = 0; if (cobdemography.SelectedValue.ToString() != "-1") { DforecastId = int.Parse(cobdemography.SelectedValue.ToString()); } ReportParameter pDForecastId = new ReportParameter("ForecastId", DforecastId.ToString()); param.Add(pDForecastId); SqlParameter rpMForecastId = new SqlParameter(); rpMForecastId.ParameterName = "ForecastId"; rpMForecastId.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId); DataSet _rDataSet = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spCD4TestNumberForecast"); SqlParameter rpMForecastId1 = new SqlParameter(); rpMForecastId1.ParameterName = "ForecastId"; rpMForecastId1.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId1); DataSet _rDataSet1 = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spHIVRapidTestNumberForecast"); SqlParameter rpMForecastId2 = new SqlParameter(); rpMForecastId2.ParameterName = "ForecastId"; rpMForecastId2.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId2); DataSet _rDataSet2 = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spChemandOtherNumberofTestforecast"); SqlParameter rpMForecastId3 = new SqlParameter(); rpMForecastId3.ParameterName = "ForecastId"; rpMForecastId3.Value = DforecastId; sqlParams.Clear(); sqlParams.Add(rpMForecastId3); DataSet _rDataSet3 = ReportRepository.GetDataSet(sqlConnection, sqlParams, "spHemaandViralNumberofTest"); filinfo = new FileInfo(Path.Combine(AppSettings.GetReportPath, String.Format("{0}.rdlc", OReports.Forecastresulttestbyregion))); FrmReportViewer frmRV = new FrmReportViewer(filinfo, _rDataSet, _rDataSet1, _rDataSet2, _rDataSet3, param); frmRV.Dock = DockStyle.Fill; frmRV.ShowDialog(); }