avernekar Posted July 25, 2018 Share Posted July 25, 2018 I have a report where i have configured input control using Single Select Query .select code,descriptionfrom code_lookupwhere table_name ='folder_type'In this query, I have set up code as Value name and description as visible columnHere is the sample data -code . descriptionDMV . Domestic ViolenseHATE . hate crmeIf the user selects Domestic Violence, then I want to display in report header and not DMV.How can I achieve this? I have seen multiple solutions on this but none work. Link to comment Share on other sites More sharing options...
riodavid Posted July 26, 2018 Share Posted July 26, 2018 That's what we do:We will write a stored procedure to translate the codes, for example:SELECT name FROM table WHERE code = 'DMV'Then we will create a new Dataset in Studio, sourcing data from that stored procedure.In the title part, retrieve data from the newly created Dataset. There you can get the whole description of that code. Link to comment Share on other sites More sharing options...
avernekar Posted July 26, 2018 Author Share Posted July 26, 2018 Thats what I do. Its doable If i have one query to refer to. But I have reports where there are 12 parameters. In page header, I can't call the values from subdatasets. That's the part I dont like about Jaspersoft. There has to be some way to achieve this. Link to comment Share on other sites More sharing options...
riodavid Posted July 27, 2018 Share Posted July 27, 2018 You can pass all the 12 parameters to a stored procedure, to generate a result set that contains 12 descriptions. For example:https://postimg.cc/image/w6idjbei5/ Link to comment Share on other sites More sharing options...
avernekar Posted July 27, 2018 Author Share Posted July 27, 2018 Where should I use that stored procedure?I certainly don't want to use as subdataset since I can't call it in page header. 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