Jump to content
JasperReports Library 7.0 is now available ×

How to pass paremeters in subreports?


ikaaki

Recommended Posts

Hi,

 

I'm using xml file as datasource.

 

A.jrxml is the parent report and B.jrxml is the subreport. I left blank for the parameters map expression, $P{REPORT_CONNECTION} for Connection/Data source Expression, and add two subreport parameters. But I don't know how to pass the parameters in the subreport.

 

There are some documents for the subreport, but they always take SQL query as examples.

In the case of SQL query, we use "select * from xxx where abc=$P{Name_Parameter}".

But for the xml datasource, anyone knows how to write an expression for passing parameters?

I think it will be something like ($F{id}==$P{id})?$F{refs_id}:"N/A"

 

Thanks in avance.

Regards,

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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