Jump to content
Changes to the Jaspersoft community edition download ×

subreport without connection


Recommended Posts

By: Bruno Leandro da Costa - costabl

subreport without connection

2003-01-16 08:59

i m try to do a subreport, but i m using JRDataSource, i did the master report but i don t know how to do for to call the subreport and pass an onther JRDataSource....

 

please... it s very urgent!!!!!!

 

 

 

By: Infogest - infogest

RE: subreport without connection

2003-01-16 09:14

simpli pass it as a parameter to the master report. name the parameter "subdatasource" for example. Then pass the datasource using $P{subdatasource}

 

 

By: Bruno Leandro da Costa - costabl

RE: subreport without connection

2003-01-17 05:44

thank s...

but how the subreport do the fill ??? it don t know that my parameter is the DataSource... how it can understand it???

with a scriptlet ???

 

 

 

By: Giulio Toffoli - gt78

RE: subreport without connection

2003-01-17 14:44

Ciao Bruno,

 

You want supply a specific JRDataSource for the subreport. Right.

To do this, you must set "in subreport 1" tab (in the element properties window for the subreport element in the master document) the Connection/Datasource Expression to "Use datasource expression" and specify as expression the name of a parameter defined in this master report (i.e. you can name this parameter "subdatasource"). The class type of this parameter must be "dori.japer.engine.JRDataSource".

In this way your subreport datasource expression results like this:

$P{subdatasource}

 

where the parameter "subdatasource" is a parameter of type dori.japer.engine.JRDataSource, the type expected by jasperReports when it elaborates the expression.

 

Now, when you fill the master database, in the parameters map , you have to add a parameter named "subdatasource" of type dori.japer.engine.JRDataSource, for instance your subreport datasource object. This object will passed to the subreport as is passed the datasource to the master report.

This is not made for free by iReport: you have to modify IReportCompiler.java to fill reports using a JRDataSource a to pass a JRDataSource as parameter to the fill function.

 

I hope this helps you

Giulio

 

 

By: Bruno Leandro da Costa - costabl

RE: subreport without connection

2003-01-20 10:31

Thank s Giulio...

 

 

By: Susan Lara - slara

I not view subreports

2003-10-16 12:57

Hello

 

I have a problem with the subreports, I call both to subreports from

masterReport but I do not see them.

 

The report Masters receives parametro Query, the subreports receive

same parametro Query since I make the allocation or passage of this

parametro to the subreports?

 

Please... it s very urgent!!!!!!

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