Jump to content
Changes to the Jaspersoft community edition download ×

subreports & data sources


2004 IR Help

Recommended Posts

By: Code_Slave - code_slave

subreports & data sources

2005-02-27 04:10

Hi,

Im trying to do the following:

 

1. pull data from a database, using a customdatasource to display in a report, (which works).

 

however 1 of the cols is a description & is too long , so i display a 3 letter code instead, and do not pull the description over the connection.

 

 

 

I want to add a summary that shows the 3 letter code and the full description, but the data is stored in 2 separate tables, and i do not want to do a single select , as this would make the query too large.

 

I could just type the codes into the summary band , but that seems sloppy.

 

 

How can i pass 1 custom datasource to the master report, then pass another custom datasource to the sub report.

 

obviously i want to do this programatically , using java.

 

currently to fill my master report i have:

 

jpPrint = JasperFillManager.fillReport(

is, parameterHashmap, ourCustomDataSource);

 

 

 

 

 

 

 

By: David Lim - aberrant80

RE: subreports & data sources

2005-02-27 18:24

Well, there's nothing stopping you from passing your second data source as a simple parameter of type Map to the main report and then setting the REPORT_DATA_SOURCE of your subreport to that parameter.

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

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