【发布时间】:2014-08-28 15:38:50
【问题描述】:
我的项目中有两个水晶报表。
我的项目中有 SaleBillReport.rpt 文件。 正在使用报告对象方法加载,其代码如下。
第一个报告显示为 -
案例 1:
SaleBillReport rptObj = new SaleBillReport();//My Rpt file name
rptObj.SetDataSource(_ReportDataSet);
_reportViewer.ReportSource = rptObj;
第二份报告显示为 -
案例 2:
ReportDocument objReportDoc = new ReportDocument();
objReportDoc.Load(@"D:\\" + "MyReport.rpt");
ReportViewerNew.ReportSource = objReportDoc;
我的问题是,在部署这个项目时,我不需要将任何 .rpt 文件放在任何地方。 它内置在我的应用程序中。
但我必须将我的第二个 .rpt 文件放到任何路径进行显示。(我不想放在任何地方) 那么我如何在部署期间在我的项目中构建案例 2 .rpt 文件。
提前致谢
【问题讨论】:
-
您使用的是哪种部署方法?设置项目或单击一次或其他什么?
-
只是在发布模式下构建应用程序。
标签: c# wpf crystal-reports