Skip to Content
0
Former Member
Apr 07, 2010 at 01:58 PM

cr4e Problem with optional parameter when empty

38 Views

Hi,

<br><br>

I have a problem with cr4e (12 update 4) when I try to put to my report an optional parameter with no value.

The program crashes with an exception because the function com.crystaldecisions.reports.common.value.SpecialCrystalValue.getValueType is called on my optional parameter which is empty.

<br><br>

here is an extract of my program when I put my parameters :

<br><br>

if (StringUtils.isEmpty(parametre.getValeur())) {
											Values noValues = new Values();
											noValues.setIsNoValue(true);
											CRJavaHelper.addDiscreteParameterValue(reportClientDoc, "", parametre
													.getNom(), noValues);
										} else {
											CRJavaHelper.addDiscreteParameterValue(reportClientDoc, "", parametre
													.getNom(), parametre.getValeur());
										}

<br><br>

and this is the exception when the report is exported or displayed in the viewer :

<br><br>

 
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: Programming error, this function should never be called.---- Error code:-2147467259 Error code name:failed

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:237)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:147)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:128)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.export(SourceFile:111)

at com.businessobjects.core.CRJavaTraitement.writeByteArrayInputStream(CRJavaTraitement.java:218)

at com.businessobjects.core.CRJavaTraitement.main(CRJavaTraitement.java:159)

Caused by: java.lang.UnsupportedOperationException: Programming error, this function should never be called.

at com.crystaldecisions.reports.common.value.SpecialCrystalValue.getValueType(Unknown Source)

at com.crystaldecisions.reports.reportdefinition.FormattedFieldValue.if(SourceFile:465)

at com.crystaldecisions.reports.reportdefinition.FormattedFieldValue.a(SourceFile:155)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.FormattedTextObject.a(SourceFile:451)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.FormattedTextObject.a(SourceFile:359)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.FormattedTextObject.do(SourceFile:274)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.AbstractFormattedTextualObject.a(SourceFile:282)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.w.for(SourceFile:126)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:428)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:250)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.a(SourceFile:922)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.e(SourceFile:784)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.u.for(SourceFile:242)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:243)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ObjectFormatter.a(SourceFile:210)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(SourceFile:185)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.v.a(SourceFile:230)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:359)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:133)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ColumnFormatter.for(SourceFile:120)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(SourceFile:511)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(SourceFile:452)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.a(SourceFile:369)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ah.a(SourceFile:72)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ReportColumnFormatter.a(SourceFile:86)

at com.crystaldecisions.reports.formatter.formatter.paginator.SinglePageFormatter.a(SourceFile:332)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:359)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ai.for(SourceFile:133)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.ColumnFormatter.for(SourceFile:120)

at com.crystaldecisions.reports.formatter.formatter.paginator.SinglePageFormatter.for(SourceFile:177)

at com.crystaldecisions.reports.formatter.formatter.objectformatter.aa.a(SourceFile:64)

at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.do(SourceFile:727)

at com.crystaldecisions.reports.formatter.formatter.paginator.PageFormatter.formatPage(SourceFile:226)

at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:96)

at com.crystaldecisions.reports.formatter.export2.a.a(SourceFile:234)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.if(SourceFile:642)

at com.crystaldecisions.reports.formatter.export2.ExportSupervisorEx.a(SourceFile:586)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.a(SourceFile:636)

at com.businessobjects.reports.sdk.requesthandler.ReportViewingRequestHandler.int(SourceFile:672)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(SourceFile:1944)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(SourceFile:661)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(SourceFile:167)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(SourceFile:529)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(SourceFile:527)

at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(SourceFile:102)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(SourceFile:525)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(SourceFile:424)

at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(SourceFile:352)

at com.businessobjects.sdk.erom.jrc.a.a(SourceFile:54)

at com.businessobjects.sdk.erom.jrc.a.execute(SourceFile:67)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(SourceFile:716)

at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(SourceFile:125)

at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(SourceFile:537)

at com.crystaldecisions.sdk.occa.report.application.ds.a(SourceFile:186)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:1558)

at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(SourceFile:337)

at com.crystaldecisions.sdk.occa.report.application.PrintOutputController.if(SourceFile:223)

... 5 more

<br><br>

Thank you for your help.

Edited by: kakol64 on Apr 23, 2010 2:05 PM

Edited by: kakol64 on Apr 23, 2010 2:05 PM

Edited by: kakol64 on May 5, 2010 2:32 PM