Reputation: 227
We're trying to show the parameter-dialog for exporting to a file. If we cannot show the dialog, the export states that not all parameter values have been set. For showing the report in the CrystalReports ReportViewer control, the dialog gets shown automatically and works fine but for export were not able to show the dialog or fill the missing values. We do not want to implement our own parameter-dialog. We just want to use the standard one? Has anybody working code for this scenario? Any help is appreciated.
Used Programs: - Visual Studio 2012 and CrystalReports 2013
Upvotes: 1
Views: 345
Reputation: 130
After fighting with the same problem the solution was:
var crv = new CrystalReportViewer();
crv.ReportSource = reportDocument;
crv.ReuseParameterValuesOnRefresh = true;
crv.ShowFirstPage();
Eventhough all forums suggest calling CrystalReportViewer.RefreshReport()
which fails constantly. All magic is done via ShowFirstPage()
.
Another hint on CrystalReports : The order DOES MATTER!
Upvotes: 1