| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | Newsletters | VB Forums | Developer.com |
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi All,
I am trying to build an application in VS.Net which uses Crystal Report 11 to build the rpt file. I have an XML and XSD file as my datasources. I want to view the report in PDF format. Now my source code looks like: ReportDocument doc = new ReportDocument(); string fileName = Server.MapPath("MyReport.rpt"); doc.Load(fileName); DataSet ds = new DataSet(); ds.ReadXml(Server.MapPath("MyXML.xml")); doc.SetDataSource(ds); ExportOptions exportOpts = doc.ExportOptions; exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat; exportOpts.ExportDestinationType = ExportDestinationType.DiskFile; exportOpts.DestinationOptions = new DiskFileDestinationOptions(); DiskFileDestinationOptions diskOpts = new DiskFileDestinationOptions(); ((DiskFileDestinationOptions)doc.ExportOptions.DestinationOptions).DiskFileName = Server.MapPath("MyPDF.pdf"); doc.Export(); But it gives me the error "Query Engine Error: 'c:\inetpub\wwwroot\MyWebsite\MyReport.rpt'" I tried out all the forums but could not find any solution. Someone told me that it is due to xsd file error. But in Crystal Report it is running perfectly OK. Can anyone help. |
|
#2
|
|||
|
|||
|
Re: Query Engine Error
did you figure out what happened? I am getting this error during my deployment, but on my local PC it works fine.
bev |
![]() |
| Bookmarks |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|