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
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 = ""