Parameters in a Page Header

Hi all,

I have bunch of reports designed for client. The requirement is I need to show all the parameters being passed in the header . The problem is the parameters sent by system are codes- like VA, CT etc. I want to show the values in the header. If nothing is being passed, then I should show " All records" .  There are various datasets in some reports. 

I could add a lookup query in one report but I can only add one query.

How can I resolve this?

avernekar's picture
Joined: Mar 1 2018 - 11:33am
Last seen: 3 years 8 months ago

4 Answers:

Can use one or many TextFields in order to show parameters in the headers. 
Not sure what do you mean about values and codes. Is value a field in your dataset or how do you get it?
In case you have a particular value for each code, then you can hard-code it.
Ex:   $P{param1}.equals("VA") ? "VAvalue" : $P{param1}.equals("CT") ? "CTvalue" :  "No value"

For the last point you mention, can put these TextFields in a frame with a print when expression.
Print the Frame when there is at least 1 TextField that is not null. 
Ex. (field1 != null || field2!=null ||.... ) ? true : false
Then can use another Textfield with expression "All records" and you opposite print expression than Frame.
Ex: (field1 != null || field2!=null ||.... ) ? false : true

Let me know if any of this is helpful. If not, give me some more information so we can work it out.


GonzaLinares's picture
Joined: Apr 17 2018 - 10:50am
Last seen: 3 weeks 4 days ago

Have you tried using scriplets to replace the code with the corresponding value?

hozawa's picture
Joined: Apr 24 2010 - 4:31pm
Last seen: 2 years 11 months ago

You can add another lookup query by add a new Dataset. This is what I usually do in my report design.

riodavid's picture
Joined: Oct 27 2016 - 1:57am
Last seen: 3 years 6 months ago

I could add various lookup datasets . But i cant use them in the page header.  I am in a transition phase from SSRS where you can call the values stored in any dataset from anywhere. 

I will give an example. Lets say I have parameter call type , folder type, crime type . The application sends me value for parameters not the corresponding labels.  It is all stored in the database. 

avernekar's picture
Joined: Mar 1 2018 - 11:33am
Last seen: 3 years 8 months ago