ajith.devendra Posted January 16, 2018 Share Posted January 16, 2018 Hi Dear,I am trying to pass a feld value in master to subreport , but its not passing to subreport . Below are the steps i followed1. Create a parameter "HawbNumber" in master 2. Create the same name parameter in subreport .3. Right click on subreport on master , Cliked on parameters4. selected "Copy from Master"5. Added parameter expression $P{HawbNumber}5. Saved the master. Link to comment Share on other sites More sharing options...
Duggu09 Posted January 16, 2018 Share Posted January 16, 2018 Hi Ajith,Please check your Subreport expression, If you are using any parameter like 'ReportDir' from where you are calling your all reports then your subreport expression should be as follow:Expression: $P{ReportsDir} + "subreport_name.jasper"Connection Expression: $P{REPORT_CONNECTION} Thanks! Link to comment Share on other sites More sharing options...
ajith.devendra Posted January 17, 2018 Author Share Posted January 17, 2018 Thanks DugguSubreport is also in the same folder .below are the expressions i use "repo:QASubReport.jrxml"$P{REPORT_CONNECTION}I missed to mention that the sub report is printing when i run the master , but only the text paragraphs ,, without the field that i passed to subreport. rgdsAjith Link to comment Share on other sites More sharing options...
sanbez Posted January 17, 2018 Share Posted January 17, 2018 >>without the field that i passed to subreportYou pass parameter of main report to subreport.You don't pass field.Question unclear Link to comment Share on other sites More sharing options...
ajith.devendra Posted January 18, 2018 Author Share Posted January 18, 2018 Dear Sanbez,Thanks for your response on my question .. Basically what i need , i have a field in master report which has been extracted from a table using sql query .. i need to pass this field's value to to the subreport . rgdsAjith Link to comment Share on other sites More sharing options...
sanbez Posted January 18, 2018 Share Posted January 18, 2018 >>1. Create a parameter "HawbNumber" in master It is not need create useless parameter in main report5. Added parameter expression $P{HawbNumber}Why? You want pass field not parameter main report.Change expression like $F{myField} - field of main report 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