By: bst05 - bsharp05
DataSource in main rpt, Connection in subrep
2005-12-21 06:34
Hi,
I have a report with a Hibernate Datasource (ArrayList of objects) in the main report. This works fine. Now I need to create a subreport within this report, but would like to create it using a connection instead of passing another array list through the parameters. I want to do this because it would just make things a lot easier and less complicated. However, is this possible?? If so, how would i go about implementing this?
Thanks,
Aditya.
By: David Heffelfinger - heffel
RE: DataSource in main rpt, Connection in subrep
2005-12-21 07:53
The way to do this is to pass the Connection object as a parameter to the parent report, then pass it along to the subreport by using the connectionExpression attribute of the <subreport> element.
David
By: bst05 - bsharp05
RE: DataSource in main rpt, Connection in subrep
2005-12-21 09:02
Thanks!
Works as expected. I thought initially that we could not pass in a connection as a parameter because it's not listed as an available parameter type in jasperassistant.
Aditya
DataSource in main rpt, Connection in subrep
2005-12-21 06:34
Hi,
I have a report with a Hibernate Datasource (ArrayList of objects) in the main report. This works fine. Now I need to create a subreport within this report, but would like to create it using a connection instead of passing another array list through the parameters. I want to do this because it would just make things a lot easier and less complicated. However, is this possible?? If so, how would i go about implementing this?
Thanks,
Aditya.
By: David Heffelfinger - heffel
RE: DataSource in main rpt, Connection in subrep
2005-12-21 07:53
The way to do this is to pass the Connection object as a parameter to the parent report, then pass it along to the subreport by using the connectionExpression attribute of the <subreport> element.
David
By: bst05 - bsharp05
RE: DataSource in main rpt, Connection in subrep
2005-12-21 09:02
Thanks!
Works as expected. I thought initially that we could not pass in a connection as a parameter because it's not listed as an available parameter type in jasperassistant.
Aditya