Hi,
I pass in parameters and set the ReportDocument.ReportSelectionFormula in my codes. But it looks like the Selection criteria has been ignored.
I refered to another thread regarding this problem, and added "crystalReportViewer1.RefreshReport()" after passing in all my parameters. However, the "Enter Parameter Values" window pops up when "RefreshReport" is being called.
The funny thing is, the report filtering problem just occurs when I print my report the first time. That means, once I start up my application and print a report the first time, all records are returned in the report. With my application still running and I print the report again, the records showed on the report are filtered according to my selection criteria set in the ReportSelectionFormula. I've checked in Debug mode, and the ReportSelectionFormula is set for both times.
Working environment:
VB.NET 2005; CR 2008 (version 12.0); windows application; using DataSet as the data source
Procedure:
- ReportDocument.SetDatasource
- CRViewer.ReportSource
- Passing parameters
- ReportDocument.ReportSelectionFormula
Your help and suggestions are very much appreciated.
Thank you.
Agnes