cancel
Showing results for 
Search instead for 
Did you mean: 

Record selection Formula is always ignored

0 Kudos

I'm facing now a strange error that no matter the record selection formula is, no filtering done on the data and the record selection formula always ignored.

I'm using SDK for visual studio , Visual studio 2012 ,and I'm not using crystal report viewer

View Entire Topic
former_member183750
Active Contributor
0 Kudos

See if this will help:

  1. Expand Form1.vb|cs to show Form1.Designer.vb|cs. 
  2. Double-click on Form1.Designer.vb|cs to show it's code. 
  3. In the InitializeComponent method, you will find code where the CrystalReportViewer1 properties are set. 
  4. Comment out or delete the following two lines:
this.crystalReportViewer.SelectionFormula = ""  
this.crystalReportViewer.ViewTimeSelectionFormula = ""   

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

0 Kudos

sorry but i don't use crystalReportViewer , i'm using export method using the SDK

former_member183750
Active Contributor
0 Kudos

Yup. The answer I gave you in my previous post applies.

- Ludek

0 Kudos

but i don't have crystalreportviewer in the initialize component and i'm sure that the recordselectionformula is populated but in the run-time no filters exists.

former_member183750
Active Contributor
0 Kudos

Ahhh - apologies. I get it. Note to self - read and pay attention to what's in the posts(!).

Does the report have saved data? See if adding something like  

crReportDocument.Refresh() will help.

- Ludek

0 Kudos

Thanks a lot. i was using

boReportDocument.ReportClientDocument.DatabaseController.SetTableLocation(boTables[0], boTable)

and after i used

boReportDocument.ReportClientDocument.DatabaseController.ReplaceConnection(boConnectionInfo, boConnectionInfo, null, 0);

because i read in another discussion that the first broke the links between tables in the crystal document object whereas the other one doesn't. so it solved the issue in some cases and in other cases the report always showed empty although there are data on the designer. correct me if I'm wrong

former_member183750
Active Contributor