Verify Database on Report with Parameterised Data Command
I have built a report which I want to run for four different tables in our MySQL database. It seems silly to have to create four different versions of the report for four different tables, so I tried to utilise the 'Add command' function which allowed me to enter a SELECT statement with a parameter of the table name. This works absolutely fine, however, if I change the table name parameter, I need to run the 'Verify database' function in Crystal Reports for the data to be shown correctly.
However, the front end for our users is a C# application which has been written to pass the necessary parameters to each report. However, when selecting a table name parameter other than the one used when the report was last saved, I get an InternalException - 'One or more fields could not be found in the result set. Use Verify Database to update the report.', Is there a way to run this function in code from .NET? (I have tried ReportDocument.VerifyDatabase() but this doesn't seem to be for the same purpose as the one I mentioned previously in Crystal Reports).
We are using Crystal Reports 2008 SP3, connecting to a MySQL database via ODBC. The application is coded using Visual Studio 2008/.NET 3.5 using the C# language. All of the database connectivity attributes of the report are set in the report itself, not in .NET.
Thanks for your help!
Edited by: StevenDay on Nov 22, 2011 12:29 PM