bharath7leo Posted July 23, 2013 Share Posted July 23, 2013 How to pass subreport field values as main report parameter in main report sql?Main report Query------------------------SELECT PERSONS."ID" AS PERSONS_ID, PERSONS."NAME" AS PERSONS_NAME, PERSONS."CITY" AS PERSONS_CITYFROM "SYSTEM"."PERSONS" PERSONS where PERSONS."ID" = $P{parm}Sub report query----------------------SELECT EMAIL_ADDRESSES."ID_PERSON" AS EMAIL_ADDRESSES_ID_PERSON FROM "SYSTEM"."EMAIL_ADDRESSES" EMAIL_ADDRESSES How to pass EMAIL_ADDRESSES_ID_PERSON to $P{parm}? Please help..Thanks,Bharath M. Link to comment Share on other sites More sharing options...
Ankur Gupta Posted July 23, 2013 Share Posted July 23, 2013 Hi Bharat You could follow these steps to return tehe field as param in the main report through subreport1. In the main report identify teh subreport element 2. Then click on the subreport element and see the properties of the element3. When you will scroll down in the properties menu then at the last you will find a option called RETURN VALUES4. Now here you can define the return value and you can get the value in the main report Hope that it helps.Thanks,Ankur Gupta Link to comment Share on other sites More sharing options...
bharath7leo Posted July 24, 2013 Author Share Posted July 24, 2013 Thanks Ankur. If there are 10 values for EMAIL_ADDRESSES_ID_PERSON how can I pass the 10 values to main report using variables? Link to comment Share on other sites More sharing options...
Ankur Gupta Posted July 24, 2013 Share Posted July 24, 2013 For multiple values,I think what you can do is that put the subreport element in the detail band so that each time value is returned from the subreport and each time the value can be used in the reportThis might work,please try it out and let me know Hopw that it helpsThanks,Ankur Gupta Link to comment Share on other sites More sharing options...
bharath7leo Posted July 25, 2013 Author Share Posted July 25, 2013 I tried with return value. But I want to pass the value from subreport to parameter in the Query of Main report. How to do that? What to give in parameter? Please help. 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