Jump to content
Changes to the Jaspersoft community edition download ×

Boolean from Report_Parameters_map compare


dunham

Recommended Posts

How do I read a boolean value from Report_Parameters_map?

 

(
   $P{REPORT_PARAMETERS_MAP}.get("booleanParam") == true ? "mifid JAA" : "mifid NEIN"
)

 

(For numbers I can simply do .valueOf(), but there seems to be no equivalent solution for booleans)

 

...When I run the following code there is an error:

(
   $P{REPORT_PARAMETERS_MAP}.get("booleanParam") == true ? "mifid JAA" : "mifid NEIN"
)

 

-> Throws error

Exception: net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. The method booleanValue(String) is undefined for the type Map
   ((java.util.Map)parameter_REPORT_PARAMETERS_MAP.getValue()).booleanValue("isMiFIDReport") == true ? "mifid JAA" : "mifid NEIN" //$JR_EXPR_ID=84$
                                                               <---------->
2. The method booleanValue(String) is undefined for the type Map
   ((java.util.Map)parameter_REPORT_PARAMETERS_MAP.getValue()).booleanValue("isMiFIDReport") == true ? "mifid JAA" : "mifid NEIN" //$JR_EXPR_ID=84$
                                                               <---------->
3. The method booleanValue(String) is undefined for the type Map
   ((java.util.Map)parameter_REPORT_PARAMETERS_MAP.getValue()).booleanValue("isMiFIDReport") == true ? "mifid JAA" : "mifid NEIN" //$JR_EXPR_ID=84$
                                                               <---------->
3 errors
.
stack: [net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:206), net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:357), net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:343), net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:608), dynamicreports.Rep3.makeReport(Rep3.java:2494), dynamicreports.Rep3.main(Rep3.java:3558)]
 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...