cancel
Showing results for 
Search instead for 
Did you mean: 

Error in File <filename>{FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt: Disk full thrown from ReportDocument.ExportToStream

Former Member
0 Kudos

Hi

We have a web service solution to export a crystal report to a PDF or a RTF file. The solution is designed with MS Visual Studio 2010 using Crystal Report version 13.0 for VS. At runtime, we are using Crystal Runtime version 13.0.1 .net redistributable files (both 32bit and 64bit) and Crystal 2011 layouts. The web service runs in IIS 7.0 server.


The issue we have is that we get an “Error in File <filename>{FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt: Disk full”  from the ReportDocument.ExportToStream method, if 2 or more simultaneous calls are sent to export the report to PDF. The following is the code I use,

Private Stream getPDFReportStream(String path, ……)

{

ReportDocument doc ;

doc.load(path);

……
  Stream exportStream =
doc.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

……

doc.Dispose();

Return exportStream;

}

I tried used the overload for ReportDocument.load method and tried sending the OpenReportMethod.OpenReportByTempCopy and OpenReportMethod.OpenReportByDefault but it didn’t help. The following are the stack traces,

7/10/2012 10:19:46 AM - === In getPDFReportStream catch :
Error in File PurchaseOrderPrintRep {FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt:
Disk full.

==== Source : CrystalDecisions.ReportAppServer.DataSetConversion

==== Stack Trace : at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportOptions options)
at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToStream(ExportFormatType formatType)
at ReportService.GetPDFReportStream(String FileName, String ParameterValues, String LangCode) in c:\inetpub\wwwroot\CRWebSetup\App_Code\Service.cs:line 159

==== Target Site : Boolean ThrowDotNetException(System.Exception)

=== BaseException : System.Runtime.InteropServices.COMException (0x80000211):
Error in File PurchaseOrderPrintRep {FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt:
Disk full.
at CrystalDecisions.ReportAppServer.Controllers.ReportSourceClass.Export(ExportOptions pExportOptions, RequestContext pRequestContext)
at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

I heard that the crystal report engine doesn’t support multithreading. Is this true? Can this be causing the above issue or something else? If so, how can I resolve it?

Regards,

Chanaka

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Are the simultaneous exports using the same instance of the report? If so, then maybe we’re trying to write the temp file (<filename>{FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt) at the same time and its not a disk full error, but rather an access issue.  (ie trying to both populate the temp report on disk with data at the same time)

Can you do a quick test to see if simply viewing of the report(s) does the same? Printing?

- Ludek

Follow us on Twitter

Got Enhancement ideas? Try the SAP Idea Place

Share Your Knowledge in SCN Topic Spaces

Former Member
0 Kudos

Hi Ludek,

First of all thank you for the quick reply. I use the same instance of the report when opening the layout. For example, the report is located at C:\reportlocation folder, and I always use C:\reportlocation\purchaseorder.rpt path to load the report. What I thought was that the Crystal framework will make temp copies using random numbers for the file name before opening and working with the report. That is why I explicitly set the report open method as well. Do you think that this is this a potential bug is the framework? How can this be resolve?


Regards,

Chanaka

Former Member
0 Kudos

Hi Ludek,

Today, what we did was we made temporary copies of the files we open before we open and load the layout. Yet, the issue is still there. What we did was we took the layout in location C:\reportlocation\purchaseorder.rpt and made a temporary copy of the layout in to the same folder by attaching a global unique identifier to the end of the file name. We also make sure that the code is thread safe as well. Yet, we still get the same “disk is full” error.

Also in your previous reply you said, that “If so, then maybe we’re trying to write the temp file (<filename>{FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt) at the same time and it’s not a disk full error, but rather an access issue.  (ie trying to both populate the temp report on disk with data at the same time)”. So, do you mean to say that the Crystal framework work is making only one copy of the “<filename>{FE8386FD-0A8D-4CAD-A8B0-00BADD402108}.rpt” and trying to use it when simultaneous exports are done? Doesn’t it make the file name random (the {FE8386FD-0A8D-4CAD-A8B0-00BADD402108} part)?

Any ideas?

Regards,

Chanaka

former_member183750
Active Contributor
0 Kudos

Hello Chanaka

Doesn’t it make the file name random (the {FE8386FD-0A8D-4CAD-A8B0-00BADD402108} part)?

Yes, it does / should. However, I'd like you to ensure that  you as soon as you are done with one of the reports, you close and dispose of the report object.

Also, looking at Process Monitorlogs will be a good idea to see what is happening when those temp files are being created.

- Ludek

Former Member
0 Kudos

Hi Ludek,

Thank you for the reply. I will check this and will get back to you.

Regards,

Chanaka

Former Member
0 Kudos

Hi Ludek,

In our code we do dispose and also close the ReportDocuemnt, but still we see the error. We close and dispose all objects including the Report Document and the Stream use to retrieve the PDF export.

I also do a small modification to the code so that it make a temporary copy of the rpt file every time a request is sent to export a report. So now it create a new copy of the rpt file when opening and loading the report to the ReportDocuemnt. The code is as below.

    private static object objLock = new object();

    private static string GetTempFile(string path)

    {

        string fileType = path.Substring(path.LastIndexOf("."), path.Length - path.LastIndexOf("."));

        string fileName = "Temp_" + string.Format(@"{0}", Guid.NewGuid() + fileType);

        string tempFile = "";

        try

        {

tempFile = Path.GetTempPath() + "\\TempFiles";

Directory.CreateDirectory(tempFile);

tempFile = tempFile + "\\" + fileName;

        }

        catch (Exception)

        {

tempFile = System.Web.Configuration.WebConfigurationManager.AppSettings["OpenReportPath"] + "\\TempFiles";

Directory.CreateDirectory(tempFile);

tempFile = tempFile + "\\" + fileName;

        }

        finally

        {

lock (objLock)

File.Copy(path, tempFile);

        }

        return tempFile;

    }

<Some more code>

  1. Doc.Load(GetTempFile(path));

<Some more code>

Then I wrote test codes, one to export the report to disk using ExportToDisk to export it to a rpt format and PDF format and another code using ExportToStream to export the report to RTF, Excel, RPT and PDF. The code I used is as below,

Test code 1:

//Exporting to crystal report format

  1. doc.ExportToDisk(ExportFormatType.CrystalReport, "c:\\temp\\rep_" + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + "_" + string.Format(@"{0}", Guid.NewGuid())+ ".rpt");

//Exporting as PDF

  1. doc.ExportToDisk(ExportFormatType.PortableDocFormat, "c:\\temp\\rep_" + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + "_" + string.Format(@"{0}", Guid.NewGuid())+ ".pdf");

Test code 2:

//Exporting as stream

Stream exportRTFStream = doc.ExportToStream(ExportFormatType.RichText);

Stream exportXSLStream = doc.ExportToStream(ExportFormatType.Excel);

Stream exportRPTStream = doc.ExportToStream(ExportFormatType.CrystalReport);

//Exporting to PDF

Stream exportFileStream = doc.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat);

What I saw was I got the same “Disk Full” error ‘only’ when it tries to export to PDF using  ExportToStream or ExportToDisk other formats exported without any issues.

I tried with ProcessMonitor as well but I don’t see any issue. Maybe I’m looking in to it the wrong way. Can you tell me what I need to check/test?

From what we tested it doesn’t look like an IO conflict but an issue in the ExportToStream and ExportToDisk method to PDF format? We have tested several ExportToStream and ExportToDisk calls (rpt, RTF, Excel) and the error is only thrown when we do an export to a PDF file.

I also tested with the latest runtime version which is 13.0.4 (runtime with SP4) but unfortunately the error is still there.

What do you think? Is this a bug or do you have any other thoughts on this?

Thank you in advance.

Regards,

Chanaka

former_member183750
Active Contributor
0 Kudos

Hello Chanaka

Thank you for doing the testing. Does sound like a bug... Unfortunately, I will not be able to test this for quite some time. Your best option is to talk to a support engineer, get them to test it, reproduce it and escalate it for a fix. You'll have to create a phone support case here:

http://store.businessobjects.com/store/bobjamer/en_US/pd/productID.98078100?resid=S6I@hgoHAkEAAGsiyV...

If it is a bug, your case will be refunded.

- Ludek

Former Member
0 Kudos

Hi Ludek,

Thank you for confirming this.

We will contact the general support as suggested.

Thank you for your time and answers.

Regards,
Chanaka

Answers (0)