public void PartyWiseSaleRet(string criteria, DataTable dt, bool vLetterHead = false) { try { objDAL.connectionstring = System.Configuration.ConfigurationManager.ConnectionStrings["MyString"].ConnectionString; DataTable dt1 = objDAL.getCompanyInfo(); if (vLetterHead) { CrpPartyWiseSaleRLH Rpt = new CrpPartyWiseSaleRLH(); Rpt.Database.Tables[0].SetDataSource(dt); Rpt.Database.Tables[1].SetDataSource(dt1); Rpt.SummaryInfo.ReportTitle = "PARTY WISE SALE RETURN"; Rpt.SetParameterValue("criteria", criteria); this.CRViewer.ReportSource = Rpt; } else { CrpPartyWiseSaleR Rpt = new CrpPartyWiseSaleR(); Rpt.Database.Tables[0].SetDataSource(dt); Rpt.Database.Tables[1].SetDataSource(dt1); Rpt.SummaryInfo.ReportTitle = "PARTY WISE SALE RETURN"; Rpt.SetParameterValue("criteria", criteria); this.CRViewer.ReportSource = Rpt; } } catch (Exception exc) { MessageBox.Show(exc.Message, "Error"); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { CrpPartyWiseSaleR rpt = new CrpPartyWiseSaleR(); rpt.Site = this.Site; return(rpt); }