cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with a page (orientation landscape) in the pdf export through JAVA

Former Member
0 Kudos

Hello,

I use Crystal Report 2008 v12.0.0.683

I have created a report .rpt with differents sections in the "Section Expert":

-> I have 7 "Group headers" sections

-> I have 7 "Details" sections

In the tab "Paging" I put the orientation of the section as default (portrait) except the 5th section (Group headers and details" which has an orientation = landscape.

Now If I export "locally" in the pdf format, I have no problem:

-> The pages 1-2-3-4 and 5-7 have the orientation = portrait

-> The page 5 have the orientation = landscape.

That is exactly what I expect.

But now if I generate the same .rpt template trough the java application and I export in pdf format, all the pages (including the page #5) have the orientation portrait.

Do I need to change options in the .rpt file or in the code.

Please find below the code that I use to generate this pdf trough JAVA:

reportClientDoc = new ReportClientDocument();

String templatePath = reportTemplatePath();

if (templatePath != null) {

reportClientDoc.open(templatePath, 0);

ParameterFieldController parameterFieldController = reportClientDoc.getDataDefController().getParameterFieldController();

DatabaseController databaseController = reportClientDoc.getDatabaseController();

//connectDatabaseControllerToISTDatabase(databaseController, messageHandler);

databaseController.logon("XXXX", "ppppp");

isReportOpen = true;

// reportClientDoc.verifyDatabase(); // check if connection is good

parameterFieldController.setCurrentValue("" , "ID", documentGenerationNumber().intValue());

ExportOptions exportOptions = new ExportOptions();

exportOptions.setExportFormatType(documentFormat()); // PDF doc format

//Export report and obtain an input stream that can be written to disk.

//See the Java Reporting Component Developer's Guide for more information on the supported export format enumerations

//possible with the JRC.

InputStream byteArrayInputStream = reportClientDoc.getPrintOutputController().export(documentFormat());

//Release report.

reportClientDoc.close();

isReportOpen = false;

Thanks for the support,

Nicolas.

Accepted Solutions (1)

Accepted Solutions (1)

ted_ueda
Employee
Employee
0 Kudos

The current Java Reporting Component won't support new Crystal Reports 2008 features.

Sincerely,

Ted Ueda

Former Member
0 Kudos

Hi,

Why each time I have a request, the answer is:

"It's not supported in this version"

I absolutely need to export a pdf file via this way.

And I absolutely need to have the beginning of my report in the "portrait" orientation and then 1 page in the "landscape" orientation and then the end of the report in the "portrait" orientation...

This feature is supported if I export directly in the format pdf from Crystal Report and that is NOT SUPPORTED if I export through JAVA.

Please give me a workaround I absolutely need,

Kind regards,

Nicolas.

ted_ueda
Employee
Employee
0 Kudos

There is a disconnect between your absolute requirements and the current version of the Java Reporting Component.

Alternatives in the Java sphere at this moment is Crystal Report Server or BusinessObjects Enterprise XI 3.0.

The version of the Java Reporting Component to support CR 2008 features is not yet out.

Sincerely,

Ted Ueda

former_member184469
Contributor
0 Kudos

Try using the Alpha build of the new CR4E.

http://beta.businessobjects.com/CR4EPreview

ted_ueda
Employee
Employee
0 Kudos

Some caveats:

Alpha is not for production use.

Opening a CR 2008 in the CR4E Alpha designer may remove CR 2008 features.

The per-section pagination feature is on the list of features not yet available in the Alpha build.

Sincerely,

Ted Ueda

Answers (0)