public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crystalCustomers rpt = new crystalCustomers(); rpt.Site = this.Site; return(rpt); }
private void setCRYSTALReport() { dsCustomers dsReport = new dsCustomers(); DataSet ds = clsADONET.setReport(dsReport, sSQL, sTable); crystalCustomers rptViewer = new crystalCustomers(); rptViewer.SetDataSource(ds); crystalviewer.ReportSource = rptViewer; pdvBUSINESSNAME.Value = clsADONET.sCompanyName; pvCollection.Clear(); pvCollection.Add(pdvBUSINESSNAME); rptViewer.DataDefinition.ParameterFields["CompanyName"].ApplyCurrentValues(pvCollection); pdvBUSINESSADDRESS.Value = clsADONET.sCompanyAddress; pvCollection.Clear(); pvCollection.Add(pdvBUSINESSADDRESS); rptViewer.DataDefinition.ParameterFields["Address"].ApplyCurrentValues(pvCollection); pdvBUSINESSCONTACTS.Value = "Phone Number: " + clsADONET.sPhoneNumber + " and " + "Fax Number: " + clsADONET.sFaxNumber; pvCollection.Clear(); pvCollection.Add(pdvBUSINESSCONTACTS); rptViewer.DataDefinition.ParameterFields["Contacts"].ApplyCurrentValues(pvCollection); pdvPREPAREDBY.Value = clsADONET.sUserFullname; pvCollection.Clear(); pvCollection.Add(pdvPREPAREDBY); rptViewer.DataDefinition.ParameterFields["PreparedBy"].ApplyCurrentValues(pvCollection); }