Hello,
I created a report with Jaspersoft Studio. The report should list all users, where the user-ID contains an entered searchtext.
If I make the searchtext as an static variable, everything is fine.
But if I try to combine the jrxml-file with a params.xml, so that I get ask to enter a searchtext before the report has been created, no window for entering the parameter value for searchtext will appear. Only the report appears without filtering.
Here my code for the params.xml:
I created a report with Jaspersoft Studio. The report should list all users, where the user-ID contains an entered searchtext.
If I make the searchtext as an static variable, everything is fine.
But if I try to combine the jrxml-file with a params.xml, so that I get ask to enter a searchtext before the report has been created, no window for entering the parameter value for searchtext will appear. Only the report appears without filtering.
Here my code for the params.xml:
Code: Select all
and a snippet of the code of the jrxml:
...
<report-parameters>
<input label="enter the searchtext:" name="searchtext" type="text">
<validator type="req"/>
</input>
</report-parameters>
Code: Select all
...
<queryString>
<![CDATA[import com.openkm.dao.*;
import com.openkm.dao.bean.*;
...
if (user.getId().contains(searchtext)) {
al.add(usr);
}
Last edited by Pitt on Tue Oct 10, 2023 6:22 pm, edited 2 times in total.