Skip to Content
avatar image
Former Member

Attempts to execute a Crystal report are failing. Event log is indicating "Invalid export type".

The entire event log is listed below. Permissions on the server folder were checked and found to be ok. Here are the log details:

Log Name:      Application
Source:        netPilgrim
Date:          9/6/2016 9:03:27 AM
Event ID:      0
Task Category: None
Level:         Information
Keywords:      Classic
User:          N/A
Computer:      HSVAMPILWEBVAL.am.sanm.corp
Description:
The description for Event ID 0 from source netPilgrim cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.

If the event originated on another computer, the display information had to be saved with the event.

The following information was included with the event: 
--------------------------------------------------
ClassName:	ASP.audittrail_aspx
MethodName:	New
Error No:	50120
--------------------------------------------------
InnerException Source:	Analysis Server
InnerException Message:	Invalid export type.
--------------------------------------------------
InnerException Stack Trace:	   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
   at EQM.UI.Web.AuditTrail.AuditTrail._RenderReport(ReportDocument reportToLoad, String searchTerm, String destCode)
   at EQM.UI.Web.AuditTrail.AuditTrail._CreateReport()

the message resource is present but the message is not found in the string/message table

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="netPilgrim" />
    <EventID Qualifiers="0">0</EventID>
    <Level>4</Level>
    <Task>0</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2016-09-06T14:03:27.000000000Z" />
    <EventRecordID>9137</EventRecordID>
    <Channel>Application</Channel>
    <Computer>HSVAMPILWEBVAL.am.sanm.corp</Computer>
    <Security />
  </System>
  <EventData>
    <Data>
--------------------------------------------------
ClassName:	ASP.audittrail_aspx
MethodName:	New
Error No:	50120
--------------------------------------------------
InnerException Source:	Analysis Server
InnerException Message:	Invalid export type.
--------------------------------------------------
InnerException Stack Trace:	   at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
   at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)
   at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()
   at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()
   at EQM.UI.Web.AuditTrail.AuditTrail._RenderReport(ReportDocument reportToLoad, String searchTerm, String destCode)
   at EQM.UI.Web.AuditTrail.AuditTrail._CreateReport()</Data>
  </EventData>
</Event>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Nov 08, 2016 at 07:35 PM

    Hi Kevin,

    You'll have to contact netPilgrim for the actual solution but the error means you have selected the export the report to some format but the application can't find the drivers for that format.

    netPilgrim should be able to tell you which files and where they should be located for the proper drivers.

    Good luck,

    Brian

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 08, 2016 at 08:05 PM

    Hi Brian,

    Thank you for your response. The system is doing export to PDF and the drivers do exist for exporting to PDF.

    This is happening only from the web application. If we copy the same code and execute it through the windows application the error does not exist. Do you know which folders crystal should absolutely have access to in order to export to a PDF document?

    The same application installed in a different computer works.

    Kevin

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 08, 2016 at 08:38 PM

    Hi Kevin,

    Did you write the software and if so what version of CR SDK are you using?

    What version of Visual Studio are you using?

    Check IIS permissions, doesn't appear to have rights to access all components.

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 08, 2016 at 11:15 PM

    When we execute the following code in ASP.NET application (.NET version 4.5.2, CR runtime 13.0.2000.0) we receive the error below. The same code works fine in the Windows Application on the same machine.

    Can you please guide us on what we should be looking at for resolving this issue? We think this is some sort of security permission issue as windows application works.

    C# code:

    var report = new ReportDocument();

    var subReport = new ReportDocument();

    var dataSet = new DataSet();

    dataSet.ReadXmlSchema(@"XMLSchema1.xsd");

    dataSet.ReadXml(@"XMLFile1.xml");

    report.Load(@"myreport.rpt");

    report.SetDataSource(dataSet);

    foreach (var sr in report.ReportDefinition.ReportObjects)

    {

    if (sr is SubreportObject)

    {

    var subReportObject = (SubreportObject)sr;

    subReport = report.OpenSubreport(subReportObject.SubreportName);

    subReport.SetDataSource(dataSet);

    }

    }

    var diskOpts = new DiskFileDestinationOptions();

    diskOpts.DiskFileName = String.Format(@"Temp\{0}.pdf", DateTime.Now.Ticks.ToString());

    report.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;

    report.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

    report.ExportOptions.DestinationOptions = diskOpts;

    report.Export();

    Exception Detail:

    InnerException Source: Analysis Server

    InnerException Message: Invalid export type.

    --------------------------------------------------

    InnerException Stack Trace: at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)

    at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

    at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

    at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)

    at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export()

    at CrystalDecisions.CrystalReports.Engine.ReportDocument.Export()

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 09, 2016 at 06:04 PM

    Hi Kevin,

    Have a look for crxfpdf.dll. This is the export driver for PDF. I had a quick look at your code and the Temp directory you are setting the DiskFileName to, is that folder available to the Service Account IIS is running under?

    If it works on desktops but not the application server then permissions would also cause a similar error.

    Thanks,

    Brian

    Add comment
    10|10000 characters needed characters exceeded