Two separate queries in a report

0

Hello Everyone, here is the situation:

 

We are writing reports for an application that has user-configurable labels for data fields. We would like to be able to write reports in iReport that can load the label information into an array and then use that array to create the labels for the report.

Is there any way to do this?

If not, does anyone have any other ideas on how we can create a report with user-specific, data-driven field labels?

 

Thanks!

jshyman's picture
Joined: May 28 2009 - 5:47am
Last seen: 5 years 4 months ago

2 Answers:

1

I am not really following what your use case is, but based on the subject of your post, I will try to give you an idea.

If you are looking to create a report that has two queries that are run, you can do so with a subreport - you can have a subreport that you pass information into from the main report and then use that within the query of the subreport, and pass the results back to the subreport.  So, if you have your main report with a query and then you pass the result to the subreport and run another query based on that, you may be able to acheive whatever it is that you are looking for.

mgeise's picture
18274
Joined: Mar 5 2007 - 6:18am
Last seen: 1 day 6 hours ago
Thanks for the suggestion. What we have is an application in which the users can change the labels of data fields as they appear in the application. We would like the customized labels to appear for the user when they run a report. Our current approach was to write a database function that we call in the query for the report that returns what the label should be. This is painfully slow, however, multiplying the runtime by up to 5x. We had thought if we could run a separate query and load the results into a map we could then use that map to determine what the field labels should be. Using a sub-report might be a good way of doing this. Though it has challenges as well: Every field in the report would have to be passed to the subreport in some form so the lookup could be performed and then each field label would have to be passed back. Though, perhaps we could send an array back...
jshyman - 6 years 10 months ago
0

If not much, why don't you try to pass in parameters?

huuquynh's picture
Joined: Aug 19 2012 - 7:13pm
Last seen: 6 years 9 months ago
Two reasons: First, it can be upwards of 20 fields on a report. Second, it is highly dynamic.
jshyman - 6 years 10 months ago
Feedback
randomness