Hi,
I want to implement report in a particular screen from where i need to pass the parameter and use that parameter in the script written for generating a report.
For example:
My script for generating a report is :
"select first_name from person where person_id = ${personid}"
I need to pass this personid from a screen as a parameter and use in the script.
Hi,
If you need to run a report from the particular screen (entity browser or editor), and pass the selected entity to report as a parameter, it may be easily done as described in the documentation: [url=https://doc.cuba-platform.com/reporting-6.2/run_actions.html]https://doc.cuba-platform.com/reporting-6.2/run_actions.html[/url]
F.e. in my project I have the “DemoEntity”. I want to have a button on the “DemoEntity” edit screen, which prints the entity to report. This may be done by the following steps.
At first, it is necessary to generate a report for an entity. The easiest way is to do it using wizard:
open the Reports->Reports in menu
click Create → Using wizard
select the “DemoEntity” in the Entity field, press Next
select columns for report, press Next
select the report format and other options
As a result an appropriate report is created. It has one parameter with type “Entity”.
I also need a button to launch the report. Add it on screen using Studio.