public static void ShowReport(EMDataSet emDataSet,int contid,string reportDescription) { GenericCrystalViewer view = new GenericCrystalViewer(); view.Text = "Balance Report"; BalanceReport report = new BalanceReport(); report.SetDataSource(emDataSet); view.viewer.ReportSource = report; ParameterFields fields = new ParameterFields(); ParameterField field = new ParameterField(); field.ParameterFieldName = "contNumber"; ParameterDiscreteValue discrete = new ParameterDiscreteValue(); discrete.Value = emDataSet.ContainerTbl.FindByContID(contid).ContNumber; field.CurrentValues.Add(discrete); fields.Add(field); ParameterField field2 = new ParameterField(); field2.ParameterFieldName = "ReportDescription"; ParameterDiscreteValue discrete2 = new ParameterDiscreteValue(); discrete2.Value = reportDescription; field2.CurrentValues.Add(discrete2); fields.Add(field2); view.viewer.ParameterFieldInfo = fields; view.Show(); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { BalanceReport rpt = new BalanceReport(); rpt.Site = this.Site; return rpt; }