Page 1 of 1

Jasper Reports Plugin - Access forms only attribute

PostPosted: Mon Mar 14, 2022 8:23 pm
by dlclark
Trying to access a receipts form variable:

The variable is fv_report_status and an example value is ' 2 Out of Balance Receipts.'

I have created a field in a jasper report, but cannot access the value: currently $F{fv_report_status} which is a string.

It is not a database instance variable; just a form variable.

Daryl()

Re: Jasper Reports Plugin - Access forms only attribute

PostPosted: Mon Mar 14, 2022 10:35 pm
by dcamargo
Daryl,

You cannot access form variables from Jasper, you would need to pass the value as a parameter
Code: Select all
var params = {fv_report_status: forms[formName].fv_report_status}
plugins.jasperPluginRMI.runReport(foundsetOrDataset, reportName, output, outputType, params);


Then use it in the report like $P{fv_report_status}

Re: Jasper Reports Plugin - Access forms only attribute

PostPosted: Tue Mar 15, 2022 2:57 pm
by dlclark
Thanks, yes that seems to do the trick!

Daryl()