leeyuiwah Posted July 28, 2009 Share Posted July 28, 2009 Hi, I now know how to get the return result of a subreport and assign it to a variable ($V). However, I need to use the result in the query (*) of the report. I wonder if I can assign the return result of a subreport to a report parameter ($P)? (* We split our table on a daily basis as it is so large. Each daily table is having the date as the suffix, so for a given day, we go to a given table. If the user specifies a range of dates (e.g. Jan 1 to Jan 31), I can run an SQL query to know what valid tables there are in the database. The result would be a collection of table names. Since each report can run only one SQL query, and I am not sure I can run a SQL subquery and use the result and make it a union of "select ... from tableJan1" "select ... from tableJan2" etc. So I came up with an idea to run a subreport to get this collection of table names.) Link to comment Share on other sites More sharing options...
swood Posted July 29, 2009 Share Posted July 29, 2009 There is a <returnValue> element option for the subreport which does what you want. ShermanJaspersoft Link to comment Share on other sites More sharing options...
leeyuiwah Posted August 1, 2009 Author Share Posted August 1, 2009 I could assign the return result of a subreport to a variable ($V) but not to a parameter ($P). I need it to be in a parameter because I need the value to drive a query. 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