简体   繁体   中英

C# dll previewing crystal report

I'm trying to generate a form containing a crystal report viewer from a dll but I got the error "Only assignment, call, increment, decrement, and new object expressions can be used as a statement" when I try to compile the dll.

Any solution to solve this problem? Many thanks.

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

Show is a function:

try tempViewer.Show();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM