Page 1 of 1

Report with a parameter "searchtext" to list all Users, which searchtext is part of their User-ID

PostPosted:Tue Oct 10, 2023 5:58 pm
by Pitt
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:
Code: Select all
...
<report-parameters>
	<input label="enter the searchtext:" name="searchtext" type="text">
		<validator type="req"/>
	</input>
</report-parameters>
and a snippet of the code of the jrxml:
Code: Select all
...
	<queryString>
		<![CDATA[import com.openkm.dao.*;
               import com.openkm.dao.bean.*;
...
  if (user.getId().contains(searchtext)) {
    al.add(usr);
  }
 

Re: Report with a parameter "searchtext" to list all Users, which searchtext is part of their User-ID

PostPosted:Tue Oct 10, 2023 6:21 pm
by Pitt
Ahhhhh, there is a bug!

If I run the report from "administration"-Tab, no window for entering the parameter appears.
But if I activate the report and put it to a profile, then I can run it from the menue "reports", and a window for entering appears and the report has been created all right!

Can someone check this problem and solve it?

Thx!!!

Re: Report with a parameter "searchtext" to list all Users, which searchtext is part of their User-ID

PostPosted:Tue Oct 17, 2023 3:17 pm
by jllort
Report the problem with some screenshot at github https://github.com/openkm/document-management-system

I do not know if we will solve now or we will waiting to the next major release we have in mind