您好,
我实现了一个RDL参数的例子
- protected void Page_Load(object sender, EventArgs e)
- {
- LoadPageReport("Orders","10248");
- }
- private void LoadPageReport(string report,string id)
- {
- GrapeCity.ActiveReports.PageReport report1 = null;
- report1 = new GrapeCity.ActiveReports.PageReport(new System.IO.FileInfo(Server.MapPath("/Reports/" + report + ".rdlx")));
- report1.Report.DataSources[0].DataSourceReference = "";
- report1.Report.DataSources[0].ConnectionProperties.DataProvider = "OLEDB";
- report1.Report.DataSources[0].ConnectionProperties.ConnectString = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};", Server.MapPath("/Data/NWind_CHS.mdb"));
- report1.Report.ReportParameters[0].DefaultValue.Values.Add(id);
- WebViewer1.Report = report1;
- }
复制代码
|