public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { rptCutBundlePlanSheet2 rpt = new rptCutBundlePlanSheet2(); rpt.Site = this.Site; return(rpt); }
private void printDtl2() { rptCutBundlePlanSheet2 oRpt = new rptCutBundlePlanSheet2(); ParameterFields ps = new ParameterFields(); ParameterField p = new ParameterField(); ParameterDiscreteValue pdc = new ParameterDiscreteValue(); SetDBLogonForReport(oRpt); p.Name = "@LayBatNo"; pdc.Value = Convert.ToInt32(cmbLayerBatchNo.SelectedValue); p.CurrentValues.Add(pdc); ps.Add(p); ParameterField p2 = new ParameterField(); ParameterDiscreteValue pdc2 = new ParameterDiscreteValue(); p2.Name = "@cutDate"; pdc2.Value = Convert.ToDateTime(txthidDate.Text); p2.CurrentValues.Add(pdc2); ps.Add(p2); crystalReportViewer1.ParameterFieldInfo = ps; crystalReportViewer1.ReportSource = oRpt; crystalReportViewer1.Show(); }