SAP Knowledge Base Article - Public

3210171 - Using a Boolean Parameter in a section suppression formula throws error "Exception in formula '{@-suppressSection-0}' at '({?Param1}) " when using Crystal Reports for Eclipse

Symptom

If a crystal report contains a boolean parameter, and that parameter is used in a section formatting formula similar to "NOT({?Param1})", then when that report is viewed in Crystal Reports for Eclipse, it will throw the error

ERROR com.businessobjects.reports.sdk.JRCCommunicationAdapter - detected an exception: Exception in formula '{@-suppressSection-0}' at '({?Param1})':
The type of the value returned does not match the type of the field.
at com.crystaldecisions.reports.dataengine.h.if(SourceFile:460)
at com.crystaldecisions.reports.dataengine.h.a(SourceFile:320)
at com.crystaldecisions.reports.dataengine.DataContext.a(SourceFile:523)
at com.crystaldecisions.reports.dataengine.DataContext.getValue(SourceFile:466)
at com.crystaldecisions.reports.dataengine.DataProcessor2.getValue(SourceFile:1892)
at com.crystaldecisions.reports.dataengine.DataProcessor2.K(SourceFile:3839)
at com.crystaldecisions.reports.dataengine.DataProcessor2.V(SourceFile:3741)
at com.crystaldecisions.reports.dataengine.DataProcessor2.aF(SourceFile:3725)
at com.crystaldecisions.reports.dataengine.DataProcessor2.byte(SourceFile:2306)
at com.crystaldecisions.reports.dataengine.DataProcessor2.new(SourceFile:2446)
at com.crystaldecisions.reports.dataengine.DataProcessor2.S(SourceFile:1037)

...

This error will occur whether you allow the viewer to prompt for the parameter or you pass the parameter value in code.

Environment

  • Crystal Reports for Eclipse 12.2.227
  • Crystal Reports for Eclipse 12.2.228

Reproducing the Issue

  1. Create a crystal report with a boolean value parameter
  2. Use that parameter in a section formatting formula

Cause

This issue is currently under investigation by development.

Resolution

This issue is currently under investigation by development.

A workaround is to use a numeric parameter instead and in the section formatting formulas use "IF {?Param1} = 0 then false else true"

Keywords

KBA , BI-DEV-JAV , BI Software Development Kits (SDKs) - Java , Problem

Product

SAP Crystal Reports 2016