Make connection expression

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.
JulEgner's picture
1134
Joined: Aug 3 2006 - 10:59pm
Last seen: 17 years 1 month ago

5 Answers:

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.
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 6 years 11 months ago
I read that you posted a feature request about this, and that you posted, that you created a subreport from a different datasource than the master report. Please tell me how to do this.
JulEgner's picture
1134
Joined: Aug 3 2006 - 10:59pm
Last seen: 17 years 1 month ago
Report connection: java.sql.Connection
Report datasource: net.sf.jasperreports.engine.JRDataSource

Giulio
giulio's picture
74195
Joined: Jan 2 2007 - 4:15pm
Last seen: 6 days 3 hours ago

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
javydreamercsw's picture
Joined: Jul 17 2006 - 9:46pm
Last seen: 6 years 11 months ago

Here is a WIKI article that my provide a possible solution:

https://community.jaspersoft.com/wiki/jaspersoft-report-using-two-separa...

sanderse's picture
4507
Joined: Jul 31 2017 - 3:51pm
Last seen: 2 hours 30 min ago
Feedback
randomness