CodeGuru Forums -
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic Newsletters VB Forums Developer.com


Newest CodeGuru.com Articles:

  • Installing SQL Server 2008
  • Writing UDFs for Firebird Embedded SQL Server
  • [Updated] Shutdown Manager
  • Building Windows Azure Cloud Service Applications with Azure Storage and the Azure SDK

  • Search CodeGuru:
     



    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports
    FAQ Members List Calendar Search Today's Posts Mark Forums Read

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1    
    Old March 31st, 2005, 05:53 AM
    crystalqueries crystalqueries is offline
    Junior Member
     
    Join Date: Mar 2005
    Posts: 4
    crystalqueries is an unknown quantity at this point (<10)
    Question Query Engine Error

    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.
    Reply With Quote
      #2    
    Old April 13th, 2005, 09:00 AM
    bsharris bsharris is offline
    Junior Member
     
    Join Date: Sep 2004
    Posts: 2
    bsharris is an unknown quantity at this point (<10)
    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
    Reply With Quote
    Reply

    Bookmarks
    Go Back   CodeGuru Forums > Visual Basic Programming > Crystal Reports


    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 01:45 AM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy


    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright WebMediaBrands Inc. 2002-2009