cancel
Showing results for 
Search instead for 
Did you mean: 

Export Crystal to PDF giving ReportSDKException: Can not create temp file error

NTruhan
Participant
0 Kudos

Hello,

We have code that we are trying to use which is supposed to pull a Crystal Report and export into a PDF but are having an issue.

QueryHelper q = new QueryHelper(boeHelper);

String strQuery = "Select * from CI_INFOOBJECTS where  SI_CUID='" + strCUId + "'";

IInfoStore infoStore = boeHelper.getInfoStore();

IInfoObjects iInfoObjects = infoStore.query(strQuery);

if (iInfoObjects == null || iInfoObjects.size() == 0) {

  throw new ReportingException("Error getting the report ID from Business Objects");

}

else {

  IInfoObject iDocObject = (IInfoObject) iInfoObjects.get(0);

  IEnterpriseSession enterpriseSession = boeHelper.getSession();

  IReportAppFactory reportAppFactory = (IReportAppFactory) enterpriseSession.getService("RASReportFactory");

  ReportClientDocument clientDoc = new ReportClientDocument();

        clientDoc = reportAppFactory.openDocument(iDocObject, 0, java.util.Locale.US);

        ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream) clientDoc.getPrintOutputController()

    .export(ReportExportFormat.PDF);

}

The Code works fine all the way down to the export line itself.  When that line executes, we get the following error:

com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Can not create temp file---- Error code:-2147215357 [CRSDK00000615] Error code name:internal

We did get another error first: com.crystaldecisions.sdk.occa.managedreports.ras.internal.ManagedRASException: Cannot open report document. --- File Repository Server error : The authentication credentials do not permit the operation. (FWB 00061)  But I was able to get around this one by setting the appropriate permissions on the folders for downloading an object.

We do have a general class QueryHelper, which is just a wrapper to do the mundane stuff like logon and establish sessions and iinfostore but that works.

Does anyone have any ideas?

Thanks,

Nathan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Nathan,

Can you please provide the following details

1. BusinessObjects product version you are using?

2. Does the issue happen with all the reports or with specific reports.

3. Have you tried exporting the report to any other format. Is the issue while exporting to other formats as well.

4. Also, have you verified that the jars in your application is as per the version of BusinessObjects you are currently using.

Thanks,

Prithvi

NTruhan
Participant
0 Kudos

Hello,

I know it has been a few days and I was doing some investigation myself and ran across a similar thread with the error: https://scn.sap.com/thread/3601870

In that thread a response was made to increase the trace level and check log files.  We did this and there was nothing in the log files pertaining to the error or any errors.  And we do see the start of some rpt file being generated on the server's Data/.../Temp/.. directory but it dies after , so I assume since the BOBJ service account can write there, and all other crystal activities through the viewer work, then the permissions are good.

Another thread here: showed to do the following:In <Installation-dir-of-BO>\Common\4.0\java\CRConfig.XML we have to increase the JAVA heap MIN and Max size

          <JVMMaxHeap>64000000</JVMMaxHeap>

          <JVMMinHeap>32000000</JVMMinHeap> 

  • Increase the value in the ReportApplicationServer Services in the CMC for "Number of database records to read when previewing or refreshing a report". The value -1 is for unlimited records but not recommended for performance.

The JVM sizes were already the size defined in the recommended values there, and the Number of database records was increased from 20000 to 30000 as per another recommendation.

Right now the code is being executed from a user's Desktop in Eclipse against a single SIA install of BOBJ and the temp directory is local to the BOBJ server.  Would this have anything to do with it?  Do we have to develop/debug this on the BOBJ server itself?

Thank you,

Nathan

NTruhan
Participant
0 Kudos

OK.  Since no one has a possible solution to this, let me try this another way:

Does anyone have a working code snippet out there they can share to run a Crystal Reports 2013 Report and return it in PDF format?

Thank you,

Nathan