C#dll预览水晶报表

本文关键字:报表 水晶 C#dll | 更新日期: 2023-09-27 18:29:01

我正试图从dll生成一个包含水晶报表查看器的窗体但当我试图编译dll时,我得到了错误"只有赋值、调用、增量、减量和新对象表达式可以用作语句"。

有解决这个问题的办法吗?非常感谢。

ReportDocument tempCover = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
tempCover.Load(exepath+"''ImageStatementCoverPage.rpt");
CrystalReportViewer tempViewer = new CrystalReportViewer();
tempViewer.ReportSource = tempCover;
tempViewer.Show;

C#dll预览水晶报表

Show是一个函数:

尝试tempViewer.Show();