on 11-11-2010 10:44 AM
Hello,
There is the following code in my .NET project:
ReportDocument MyReportDocument = new ReportDocument();
MyReportDocument.Load(@"C:\MyReport.rpt");
MyReportDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;
MyReportDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
DiskFileDestinationOptions diskOpts = ExportOptions.CreateDiskFileDestinationOptions();
diskOpts.DiskFileName = @"C:\ExportedReport.pdf";
MyReportDocument.ExportOptions.ExportDestinationOptions = diskOpts;
SetConnectionInfo(MyReportDocument);
if (MyReportDocument.Rows.Count > 0)
{
MyReportDocument.Export();
}
MyReportDocument.Close();
MyReportDocument.Dispose();
The following line throws the System.Data.EvaluateException: Cannot find column \[LOAD].:
if (MyReportDocument.Rows.Count > 0)
There is no "LOAD" column in my database tables and in my report.
Everything works fine when I comment this line.
I call this property to determine if any data is loaded.
I use Crystal Reports XI R2
So I have the questions:
-
1. What should I do to avoid this error?
2. Is there any alternate method or property?
I know that there is ReportDocument.HasRecords property in Crystal Reports 2008, but this property doesn't exist in Crystal Reports XI R2 version.
How can I determine if any data is loaded for XI R2 version?
-
Thank you.
Hi Andrey,
Lot of information required:
1) Service Pack you are on
2) Windows or Web Application
3) Visual Studio Version
Thanks,
Saurabh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
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.