GrapeCity.ActiveReports.PageReport rptPreview = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("Reports/rptInvoice.rdlx")));
rptPreview.Report.ReportParameters[0].DefaultValue.Values.Add("1"); rptPreview.Report.DataSources[0].ConnectionProperties.ConnectString = string.Format("provider=Microsoft.Jet.OLEDB.4.0;data source={0}", Server.MapPath("Data/NWind_CHS.mdb"));
WebViewer1.Report = rptPreview;
GrapeCity.ActiveReports.PageReport rptPrint = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("Reports/rptInvoice.rdlx")));
rptPrint.Report.ReportParameters[0].DefaultValue.Values.Add("0"); rptPrint.Report.DataSources[0].ConnectionProperties.ConnectString = string.Format("provider=Microsoft.Jet.OLEDB.4.0;data source={0}", Server.MapPath("Data/NWind_CHS.mdb"));
WebViewer2.Report = rptPrint;
你加的那个参数是干什么的?我也需要加吗?在那用到的。 |