2
votes

I know there are couple of JasperReports parameters work in iReport but fails in JasperReports Server but I am getting crazy here and not sure what else I could try:

Query:

Select
  app_user."first_name",
  app_user."last_name"
From
  app_user
Where
  app_user."first_name" like $P{a}

Parameters (added new parameter with following data):

name: a
Parameter class: java.lang.string
Use as a prompt: checked

Everything else empty.

If I run this in iReport I get a prompt widow and can input string there and the report filters out correctly as I get correct data in preview.

In order to work with this report on server I've added new Input control:

id: a
name: a
Type: multi-select query (check box)
query resource: local
id: a
name: a
Query
Select
    app_user."first_name"
From
    app_user

Data source (from repository and selected database)
Value and visible columns
Value: first_name
Visible columns: first_name

when I run this report from JR Server I get correct input control (to select from first_name) but the report I get is empty.

I am not sure what else can I check or do as the parameter names, queries and others should be good.

If there are any ideas what else could be wrong in my settings.

1
Since you have used a multi select query as your input control, change your query main query to Select app_user."first_name", app_user."last_name" From app_user Where app_user."first_name" in ($P{a}) and give it a tryRashmi Nagaraja
I've tried what is proposed but unfortunately the result is the same. So empty report is created as before.user2477868
change your input control query to Select app_user."first_name" as a From app_user and give it a tryRashmi Nagaraja
If I do this I get in pop up screen a and then only one check box (before I got the names). Even if I select it I still get empty report. Thank you for your time and helpuser2477868
Not sure if this is the cause of your problem, but in your main query, the "IN" syntax with a collection parameter should be: WHERE $X{IN, first_name, a}Lisa

1 Answers

0
votes

iReport preview and JRServer will not be using the same db connections - are you sure the jdbc connections on the server are completely defined for the server's report just like the local connection for your iReport preview? In JRServer Data Sources did you test your connection?