public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptTaxReportProductWise rpt = new crptTaxReportProductWise(); rpt.Site = this.Site; return(rpt); }
/// <summary> /// Function to print TaxReport in curresponding Crystal report /// </summary> /// <param name="dsTaxReport"></param> /// <param name="isBillwise"></param> internal void TaxCrystalReportPrint(DataSet dsTaxReport, bool isBillwise) { try { crptTaxReportBillWise crptTaxReportBillWise = new crptTaxReportBillWise(); crptTaxReportProductWise crptTaxReportProductWise = new crptTaxReportProductWise(); foreach (DataTable dtbl in dsTaxReport.Tables) { if (dtbl.TableName == "Table") { if (isBillwise == true) { crptTaxReportBillWise.Database.Tables["dtblCompany"].SetDataSource(dtbl); } else { crptTaxReportProductWise.Database.Tables["dtblCompany"].SetDataSource(dtbl); } } if (dtbl.TableName == "Table1") { if (isBillwise == true) { crptTaxReportBillWise.Database.Tables["dtblTaxReport"].SetDataSource(dtbl); } else { crptTaxReportProductWise.Database.Tables["dtblTaxReport"].SetDataSource(dtbl); } } } if (isBillwise == true) { this.crptViewer.ReportSource = crptTaxReportBillWise; } else { this.crptViewer.ReportSource = crptTaxReportProductWise; } SettingsSP spSettings = new SettingsSP(); if (spSettings.SettingsStatusCheck("DirectPrint") == "No") { base.Show(); this.BringToFront(); } else { crptTaxReportBillWise.PrintToPrinter(1, false, 0, 0); } } catch (Exception ex) { MessageBox.Show("PS" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptTaxReportProductWise rpt = new crptTaxReportProductWise(); rpt.Site = this.Site; return rpt; }