Jump to content
Changes to the Jaspersoft community edition download ×

How to pass a value from main report to subreport?


jkeri

Recommended Posts

I have an EXCEL data source containig 3 fields (DONORNUMBER, LASTNAME, DOB).

I have  created a Jasper report that reads the EXCEL data . In this report i created a subreport with a different data source that reads from an SQL query.

What i want to do is to use the DONORNUMBER from the EXCEL and pass it to the SQL query in the subreport.

SELECT GENDER from DONOR_TABLE where DONOR_TABLE.DONORNUMBER = donor number value passed from the EXCEL

How do I pass the DONORNUMBER from the EXCEL into my subreport?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi there -

Look for the Subreport Parameters Map pop-up, which you can find by selecting your Subreport object and going to the Properties.  Click on the Subreport tab.  Next, look for and click the Edit Parameters button near the bottom.  You'll have to map the values to each other. 

Let us know.

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