on 08-04-2008 7:51 PM
I have been in the process of making changes to a legacy application as described in this post. [|]
I have changed the references from 10.0 to 10.2. The application included references to CrystalDecisions.CrystalReports.Design, CrystalDecisions.Enterprise.Framework and CrystalDecisions.Enterprise.InfoStore which did not have a comparable version in 10.2, so for the moment I have removed them.
I have then tried to run the application (compiles fine) and run into this error:
A first chance exception of type 'System.Exception' occurred in CrystalDecisions.CrystalReports.Engine.dll
The code where it fails is here, when it is trying to load it into the report:
private void SendDailyRentalDataToCrystal()
{
crystalFailure = false;
try
{
crystalDailyRentalReport.Database.Tables["ReportParameters"].SetDataSource(dsDailyRentalParameters);
crystalDailyRentalReport.Database.Tables["ReportData"].SetDataSource(dsDailyRentalData);
}
catch
{
crystalFailure = true;
string error = "Unable to generate the Daily Rental Report. ";
error += "There was a problem sending the data to Crystal Reports.";
System.Windows.Forms.MessageBox.Show(error, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
The DataSet visualizers for dsDailyRentalParameters and for dsDailyRentalData both indicate that there is valid data being returned from SQL Server. This code is part of a Win32 application developed using VS 2005 and the reports were originally developed using Crystal Reports 10.
Thanks for any help that you can provide.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ludek-
It appears that during the course of trying to rectify the CR versioning issues that I had, I altered the functionality of the application. This morning I reverted back to the previous version of my application and started over on the changes. After all, I only had a couple small changes to make.
I now have a functioning application. However, I am not sure exactly what the cause of the last issue that I was fighting or how to fix it.
Anyway, thanks much for the assistance that you provided.
Regards,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OK, I verified that "Verify on First Refresh" is check. No option exists for saving data.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ludek-
I did not find an option to check those settings within VS 2005. Does VS have a report designer or do I need to go back to CR 10 to check this?
Thanks,
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oops, forgot you're using CR 10.2, but no problem. If you are loading the report from path, best to do this in the CR designer if it is still available to you. If the reports are strongly typed (e.g.; crreportdoc = New Report1) Double click on the report in the solution explorer. On the design view of the report, right click on any empty space. From the pop up menu select "Report" and you will find "Report Options there".
Ludek
Ludek-
That thread was useful. I am now able to see that the dataset contains the data that I expect.
When I "Browse Field Data" each field returns values that I would expect. However, when I preview the report, I am getting data that is not even in the DataSet. It still generates, but not with results that I would expect. I am not sure how to interpret this.
Scott
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A little strange, but try this:
Open the report in the CR designer, go to the File menu and ensure there is not check mark next to "Save data with report".
Next, again under the File menu, click on "report options". Find "Verify on first refresh". Enable this option. Save the report and refresh it (F5). Do you still see the weird data? If not, try the report in the app now.
Ludek
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.