cancel
Showing results for 
Search instead for 
Did you mean: 

JRC error exporting crystall report to pdf

0 Kudos

Hallo, I'm tring to export a pdf file from a crystall report .rpt.

The proccess flow is:

open the report 
reportClientDoc.open(reportFileName, 0); 
... 

change datasource 
switch_tables(reportClientDoc.getDatabaseController()); 
... 

set parameters 
foreach param... 
   addDiscreteParameterValue(reportClientDoc, paramName, "", paramValue); 
... 

export to pdf 
reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF); 

When I perform the export I have this error:

...

DEBUG [com.crystaldecisions.reports.formulas.Evaluator] - <Evaluating formula {@{DSParameter}::{?DOCKEY}}...>

DEBUG [com.crystaldecisions.reports.formulas.Simplifier.Fields] - <The current value of field {?DocKey@} is: n(158.0)> INFO [com.crystaldecisions.reports.formulas.Evaluator] - <Formula {@{DSParameter}::{?DOCKEY}} evaluated to: n(158.0)>

DEBUG [com.crystaldecisions.reports.formulas.Evaluator] - <Evaluating formula {@{DSParameter}::{?OBJECTID}}...>

DEBUG [com.crystaldecisions.reports.formulas.Simplifier.Fields] - <The current value of field {?ObjectId@} is: n(17.0)> INFO [com.crystaldecisions.reports.formulas.Evaluator] - <Formula {@{DSParameter}::{?OBJECTID}} evaluated to: n(17.0)>

DEBUG [com.crystaldecisions.reports.exporters.page.pdf.AdobePDFExporter] - <PDFExporter: PDFFormatter.finalizeFormatJob>

ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] - < detected an exception: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at com.crystaldecisions.reports.dataengine.m.l(SourceFile:370) at com.crystaldecisions.reports.dataengine.m.b(SourceFile:333) at com.crystaldecisions.reports.dataengine.j.b(SourceFile:515) at com.crystaldecisions.reports.dataengine.m.o(SourceFile:408) at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173) ...

...

The only other strange thing I see in the log is same FormulaException like this:

DEBUG [com.crystaldecisions.reports.formulas.Compiler] - <Compiling formula {@TotParziale}...>

DEBUG [com.crystaldecisions.reports.reportdefinition.fieldmanagerbase] - <FieldManager.decodeFieldSpec() called for name '{INV1.Price}'.>

INFO [com.crystaldecisions.reports.formulas.Compiler] - <Formula {@TotParziale} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exception in formula '{@TotParziale}' at '{INV1.Price}': This field name is not known.>

DEBUG [com.crystaldecisions.reports.formulas.Compiler] - <Compiling formula {@SumVAT}...>

DEBUG [com.crystaldecisions.reports.reportdefinition.fieldmanagerbase] - <FieldManager.decodeFieldSpec() called for name '{INV1.LineVat}'.>

INFO [com.crystaldecisions.reports.formulas.Compiler] - <Formula {@SumVAT} did not compile: com.crystaldecisions.reports.formulas.FormulaException: Exception in formula '{@SumVAT}' at '{INV1.LineVat}': This field name is not known.>

Could anyone help me with this issue?

Thanks

Giu

Accepted Solutions (0)

Answers (1)

Answers (1)

0 Kudos

I simplified my report, now I dont have any more formula problems. But the main problem is still there:

ERROR [com.businessobjects.reports.sdk.JRCCommunicationAdapter] - < detected an exception: Index: 0, Size: 0

at java.util.ArrayList.rangeCheck(ArrayList.java:653)

at java.util.ArrayList.get(ArrayList.java:429) at com.crystaldecisions.reports.dataengine.m.l(SourceFile:370)

at com.crystaldecisions.reports.dataengine.m.b(SourceFile:333)

at com.crystaldecisions.reports.dataengine.j.b(SourceFile:515)

at com.crystaldecisions.reports.dataengine.m.o(SourceFile:408)

at com.crystaldecisions.reports.dataengine.m.a(SourceFile:173)

...


Searching on internet I found https://forum.reportserver.net/viewtopic.php?id=554 where seams the problem become from the use of a store procedure. Actually I also use a storepro in my report.

Is there some best practicse in order to include storepro in a report that has to be processed by JRC?

Thanks

Giu