Is it possible to pass both an SQL query, e.g. (<![CDATA[$P!{SQL}]]>)
, and a variable $V as parameters to a Jasper report at the same time?
Also, how can I pass the variable $V to my Jasper report using Java?
A variable is something that varies during the report generation, like the number of pages for example. So a variable ($V
) is not something you can pass to a report. You may pass any value from your Java code to the report as a parameter ($P
), though.