Jasper Reports Plugin - Access forms only attribute

Questions and answers on developing, deploying and using plugins and JavaBeans

Jasper Reports Plugin - Access forms only attribute

Postby dlclark » Mon Mar 14, 2022 8:23 pm

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()
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm

Re: Jasper Reports Plugin - Access forms only attribute

Postby dcamargo » Mon Mar 14, 2022 10:35 pm

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}
Danny Camargo
Servoy & Web Developer
dcamargo
 
Posts: 13
Joined: Tue Aug 23, 2016 8:59 pm

Re: Jasper Reports Plugin - Access forms only attribute

Postby dlclark » Tue Mar 15, 2022 2:57 pm

Thanks, yes that seems to do the trick!

Daryl()
dlclark
 
Posts: 38
Joined: Sat Jan 08, 2022 5:39 pm


Return to Plugins and Beans

Who is online

Users browsing this forum: Bing [Bot] and 6 guests