Jump to content
We've recently updated our Privacy Statement, available here ×

passing filed value from master to subreport


ajith.devendra

Recommended Posts

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 followed

1. Create a parameter "HawbNumber" in master 

2. Create the same name parameter in subreport .

3. Right click on subreport on master , Cliked on parameters

4. selected "Copy from Master"

5. Added  parameter expression   $P{HawbNumber}

5. Saved the master.

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

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

Thanks Duggu

Subreport 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.

 

rgds

Ajith 

 

Link to comment
Share on other sites

>>1. Create a parameter "HawbNumber" in master 
It is not need create useless parameter in main report

5. 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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...