Parameters ignored when passed to Crystal Reports .net

This is a crazy, crazy annoying bug. Basically, when the Crystal Windows Form Viewer is added, the auto-generated code adds two lines that will overwrite the selection formula!!!

Answer came from

https://stackoverflow.com/questions/10584989/select-criteria-not-working-in-crystal-reports-and-visual-studio-2010/15421308#15421308

Resolution

To resolve the issue, follow these steps:

Expand Form1.vb|cs to show Form1.Designer.vb|cs. (form1 denotes the form that contains your viewer)

Double-click on Form1.Designer.vb|cs to show its code.

In the InitializeComponent method, you will find code where the CrystalReportViewer1 properties are set.

Comment out or delete the following two lines:

me.crystalReportViewer.SelectionFormula = ""

me.crystalReportViewer.ViewTimeSelectionFormula = ""

 

 

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s