cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting to PDF from rpt file and charts within not exported properly

Former Member
0 Kudos

I am having issues when export .rpt file to pdf report using crystal report java. When exporting from Crystal Report, it displays the charts and boarders properly but when exporting using Java application the back ground colors and boarders disappears or fades. It makes the report look unprofessional. I am using version 2.0.

Looking at this release note at the this link (http://www.businessobjects.com/products/dev_zone/eclipse/cr4e-updates-readme.pdf ) I see a reference to "JRC SDK RTF exporting is not consistent with CR RTF exporting" has been fixed in Release Update 8. I tried the latest release but it seems it has release update 4 only. So, my question is where do I get Release update 8? I am hoping that will fix my issue or if anybody has any suggestions that will help me resolve it. If you can reply at your earliest, I would really appreciate it.

Thanks for your help in advance.

Edited by: selomabebe on Jul 6, 2010 8:18 PM

Accepted Solutions (1)

Accepted Solutions (1)

ted_ueda
Employee
Employee
0 Kudos

What viewer? The web viewer (DHTML)?

Are the backgrounds and borders separate from the charts (i.e., section background and boxes)?

Sincerely,

Ted Ueda

Former Member
0 Kudos

Ted - It is just java application that creats pdf file and yes, backgrounds and borders are separate from the charts.

ted_ueda
Employee
Employee
0 Kudos

So is the white background of the Chart obscuring the border and background?

Sincerely,

Ted Ueda

Former Member
0 Kudos

the back ground color is a light bluish grey

Former Member
0 Kudos

Hi Ted -

The background isn't white (it is light bluish grey) so I don't think that is the issue. I am guessing the way the runtime library handles charts may be the issue. The testers discovered more issue. It seems the runtime changes the chart range values as well. For example: The range for y-axis (left column) is designed from -40 to 120 within the rpt but when exported using the application it gets shrank to 0 to 100. It seems to adjust it based on the data. We need to get this resolved as soon as possible. Is this a limitation to the runtime? If so, we need to know that so that we can come up with another plan. Also is there a work around that can be done in the rpt file?

Thanks your help.

Answers (2)

Answers (2)

Former Member
0 Kudos

Here is snippet of code how I am exporting rpt file to pdf file. I didn't include every code here but I am hoping this will give you the idea. Please let me know if you need more info.

public byte[] runReport(RPTParameters para) throws SQLException {

byte[] reportData = null;

ReportClientDocument reportClientDocument = null;

try {

reportClientDocument = new ReportClientDocument();

reportClientDocument.setReportAppServer(ReportClientDocument.inprocConnectionString);

reportClientDocument.open(ReportDataConstants.CPS_RPT_FILE, OpenReportOptions._openAsReadOnly);

ExportOptions exportOptions = new ExportOptions();

PDFExportFormatOptions pdfOptions = new PDFExportFormatOptions();

exportOptions.setExportFormatType(ReportExportFormat.PDF);

exportOptions.setFormatOptions(pdfOptions);

ParameterFieldController paramFieldController = reportClientDocument.getDataDefController().getParameterFieldController();

paramFieldController.setCurrentValue("", "@ba", para.getBusinessAgreement());

paramFieldController.setCurrentValue("", "ReportMonth", para.getMonth());

paramFieldController.setCurrentValue("", "ReportYear", para.getYear());

InputStream reportInputStream = reportClientDocument.getPrintOutputController().export(exportOptions);

reportData = new byte <reportInputStream.available()>;

reportInputStream.read(reportData);

}

catch (ReportSDKException e) {

.

.

.

}

finally {

}

return reportData;

}

Former Member
0 Kudos

Hi selomabebe,

Can you please tell me what are the steps to export .rtf file to pdf format? If you have a sample java code that does it that would be great.

Thanks,

Abhijeet