I found out that it is possible to set a connection expression for subreports that does not have to be the connection expression of the main report.
But how do i make a new connection expression? I even cannot read the connection expression of the main report because iReport does not let me.
Maybe I only need to know the syntax of a Report Connection.
I need this Information because this seems a way to have more than one Datasource in a Report. I have to use several Databases and if I do not find a way to do this with iReport, or a simple Way to put everything in one Database, I may be forced to use Crystal Reports. I would prefer to stay using iReport.
But how do i make a new connection expression? I even cannot read the connection expression of the main report because iReport does not let me.
Maybe I only need to know the syntax of a Report Connection.
I need this Information because this seems a way to have more than one Datasource in a Report. I have to use several Databases and if I do not find a way to do this with iReport, or a simple Way to put everything in one Database, I may be forced to use Crystal Reports. I would prefer to stay using iReport.
5 Answers:
Posted on August 17, 2006 at 12:07pm
I'm with the same problem. I posted a related question some time ago (http://www.jasperforge.org/index.php?option=com_joomlaboard&Itemid=215&f...) and still waiting for an answer. Just posting here to make sure to get noticed if some answer arises.
Posted on August 21, 2006 at 12:05pm
Report connection: java.sql.Connection Report datasource: net.sf.jasperreports.engine.JRDataSource |
Ok those are the classes to be used in each case.
An example will be more than welcomed since I have no experience with the report datasource.
In the SubReport's Properties/SubReport Connection / Datasource Expression- Use datasource expression it creates a default $P{MyDataource}. I proceeded to create the $P{MyDataource} parameter, but what I write in? WHat's the format? Any example?
Post edited by: javydreamercsw, at: 2006/08/21 12:05
Posted on June 14, 2022 at 9:17am
Here is a WIKI article that my provide a possible solution:
https://community.jaspersoft.com/wiki/jaspersoft-report-using-two-separa...