avernekar Posted July 24, 2018 Share Posted July 24, 2018 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? Link to comment Share on other sites More sharing options...
GonzaLinares Posted July 24, 2018 Share Posted July 24, 2018 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 : falseThen can use another Textfield with expression "All records" and you opposite print expression than Frame.Ex: (field1 != null || field2!=null ||.... ) ? false : trueLet me know if any of this is helpful. If not, give me some more information so we can work it out.Regards,GL. Link to comment Share on other sites More sharing options...
hozawa Posted July 24, 2018 Share Posted July 24, 2018 Have you tried using scriplets to replace the code with the corresponding value?https://community.jaspersoft.com/blog/all-you-want-know-about-scriptlets Link to comment Share on other sites More sharing options...
riodavid Posted July 25, 2018 Share Posted July 25, 2018 You can add another lookup query by add a new Dataset. This is what I usually do in my report design. Link to comment Share on other sites More sharing options...
avernekar Posted July 25, 2018 Author Share Posted July 25, 2018 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. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now