on 08-18-2010 5:56 PM
I have some reports created with CR4VS2008 that normally work in VS2010+CR4VS2010 (after the standard conversion of the VS solution), but if I edit without changes the .rpt in VS2010 and than save the file in the new CR format, the selection formula hard coded in the rpt no longer works (the selection formula is very simple: {table.field} = 'ALL' ).
Thanks in advance for your help.
Hello,
When you edit the old report also Verify the database. What happens?
THank you.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rocco,
Actually if CR indicates the database changed it did as compared to what the report has saved for your original database info. This also includes field size and naming as well as linking etc.
What database are you using and which database driver, ODBC, OLE DB, Native, etc.?
Thank you
Don
Hi Rocco,
Are you using both databases in the same report or supporting both DB's but only using one at a time?
If you are using both that may be the issue. You can't use Server side Grouping and SQL Expressions will cause problems if they are not deleted first. Try deleting the fields and then tables in blocks to see when the report starts to work and then narrow down which table is causing the problem and to the field level.
Thank you
Don
Hi Dan,
thanks for you help.
Anyway I'm using only a connection at a time (to support both Access .mdb files and SQL Server CE .mdf files but in two different deployments).
Also I am using only one table for my reports ... for this reason I think the problem i very strange.
It is possible that I'm forgetting something but i do nothing (I only save the report in the new format) and then in CRVS2008 my reports work without problem.
Thanks again
Rocco
Hi Don,
I solved my problem.
I changed in report and in code from rpt.RecordSelectionFormula to rpt.DataDefinition.SavedDataSelectionFormula and now it works.
// CS code
...
MyReport rpt = (MyReport )MyWindowsForm.crystalReportViewer1.ReportSource;
...
// Does not work in CR4VS2010 Beta2 but works in CR4VS2008
rpt.RecordSelectionFormula = "{TABLE.FIELD} = 'MY FILTER VALUE'";
// Works in CR4VS2010 Beta2
rpt.DataDefinition.SavedDataSelectionFormula= "{TABLE.FIELD} = 'MY FILTER VALUE'";
Hope this help.
Rocco
Thank you for posting your solution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.