So, I've done lots of searches both here and on google... have tried lots of suggestions but nothing seems to work.
I have a 'test' application that wrote that replicates our applications reporting functionality. It is currently written in VS2008/VB.Net .NET 3.5 framework and uses the crystal reports 11.5 run time. All reports are external files, this code and this set of report has been working fine for several years. We are now trying to upgrade our dev env to VS2010 using .NET 4.0 framework (full version not the client version).
The test application does the following:
- Shows dialog for user to pick the report file to run
- .Load : load the report
- Reads our DB connection info from our reg key
- Updates the login info for the report (and any sub report if they exist)
- Goes through the Parameters looking for one named @LocationId
If the parameter exists, we set it a defined value so the user never gets prompted.
(Any other parameters are untouched and the Crystal Viewer prompts for them as designed)
- We then assign the report document to the crystal viewer .ReportSource
This all works fine in the current environment.
To test for upgrade I did the following.
- Installed CR for VS2010 (have tried the Release, SP1-SP5)
- Upgraded the test project to VS2010
- Changed the .NET Framework to 4.0
- Cleaned the project and rebuilt.
I then started testing various reports. Most seem to work just fine, but a few are having serious issue. The CR Viewer is prompting for the @LocationId parameter we are setting.. it does so over and over ... and the report never runs.
So, same exact report, just different run time versions .... very different results.
We have multiple customers, each has copies of the report(s) for our application...
each customer has their own copy of .Crystal Reports designer to modify/add reports.
What we are trying to avoid is manually updating a bunch of report across a large number of customers.
I do not write the reports, only maintain the code that displays them....
One example is as follows
There are 2 Stored Procedures
Both SP's have the @LocationId parameter as their only parameter.
There are 2 Parameter Fields Defined
@LocationId : is set in code
StatementDate : Is the Dynamic LOV (displays a String, but returns an numeric ID Value)
The first SP is used to build a dynamic LOV's from one of our tables
The second is actually used to build the report details from another table, based on what is picked in the first.
There are no 'Links' defined in the Database Expert (although I have tried adding them to see if it made a difference.. it did not)
On the reports Record Selection Formula Editor it does the following to filter the records
{tl_sp_StatementGroups_AgedAR_Report;1.ID} = {?StatementDate}
Again, all this worked exactly as is with VS2008/CR Runtime 11.5.....
(The @LoationId was set in code and the user was not prompted for this value
The LOV of statement dates was displayed and allowed the user to pick a value as desired)
my question(s)
- Is this a bug in the VS2010 run time / or was it a bug in the 11.5 that it actually ran to begin with
- The behavior is definitely different, is there any way via VB code that I can compensate? (nothing that I've found leads me to believe this is true).
- Are we stuck with manually 'updating' a bunch of report across many different customers?
I've spent a considerable amount of time researching / experimenting with the code.. with no luck. The only
thing that has worked so far is to modify the report and associated SP's.
Any input much appreciated.