on ‎2010 Nov 22 10:30 AM
Record Selection Formula is not working or in the Beta or the Release of Crystal. NET 2010 in runtime, at design time the report filtered properly, but at runtime when loading the report provides no filtering. Something like Cab_Albaran.Id_Albaran = is omitted when launching the report from VB.NET.
In Crystal for. NET 2008 work properly.
Any solution?
Request clarification before answering.
Thanks for your reply, the code is in VB.NET and the instruction is Report.DataDefinition.RecordSelectionFormula = "{Cab_Albaran.Id_Albaran} = 32205" and completely ignores what is the same instructions that I am using in VS2005 and VS2008, but from VS2010 with the new crystal reports (Beta or Release) does not work ...
It may be some kind of error in Crystal Reports ..?
Thank you for your attention.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I understand that this is in CR2010, but see if the KBase [1204895 - Selection formula is ignored when using Crystal Reports 2008 and VS .NET 2005|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_dev/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233303334333833393335%7D.do] helps.
Ludek
Follow us on Twitter http://twitter.com/SAPCRNetSup
Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
I'm also having the same issue with Record Selection. And, I also am unable to access the KB article and receive a 404 error. Entering the KB number in the search box returns 4 references -- all pointing to forum articles and none pointing to the actual KB article. Fortunately, one of the forum articles seems to give the secret answer of commenting out two lines in the designer file (viewer.SelectionFormula and viewer.ViewTimeSelectionFormula).
DaveL5
Here is a copy of the KB:
Symptom
When upgrading a VS .NET application to use Crystal Reports 2008 in Visual Studio .NET 2005, the selection formula (.RecordSelectionFormula) is ignored.
Cause
In Visual Studio .NET 2005, when the Crystal Windows Form Viewer is added to a Windows Form, the auto-generated code adds two lines of code that set the selection formula to an empty string (""). The viewer's SelectionFormula and ViewTimeSelectionFormula are set to "" by default, thus, the application will ignore selection formulas, be it in the report designer or passed to the report at runtime.
Resolution
To resolve the issue, follow these steps:
Expand Form1.vb|cs to show Form1.Designer.vb|cs.
Double-click on Form1.Designer.vb|cs to show it's code.
In the InitializeComponent method, you will find code where the CrystalReportViewer1 properties are set.
Comment out or delete the following two lines:
this.crystalReportViewer.SelectionFormula = ""
this.crystalReportViewer.ViewTimeSelectionFormula = ""
- Ludek
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.