2011-11-08 58 views
1

我創建了使用Crystal Report 2010的WPF C#(.Net 4.0)應用程序。在此處,我將Windows窗體CrystalReportViewer集成到WPF窗口,並按如下方式將數據集加載到CrystalReportViewer。如何使用WPF Crystal Report 2010應用程序部署?

ExtraCR report = new ExtraCR();//crystal report object 
report.SetDataSource(DataAss.extset);//dataset load to crystal reoprt 
CrystalReportViewer rptViewer = new CrystalReportViewer(); 
WindowsFormsHost host = new WindowsFormsHost(); 
rptViewer.ReportSource = report; 
host.Child = rptViewer; 
CReport.Children.Add(host); 

它編譯和運行完美。當我部署這個項目時,打開Crystal Report崩潰。我沒有傳遞有關Crystal Report部署的經驗。那麼如何在項目部署時根據我的代碼給出路徑並添加Crystal Report?任何人都可以指導我根據我的代碼部署Crystal Report項目嗎?請幫幫我。

回答