By: Jay Fleck - jayf23
A Subreport Question
2003-02-21 15:05
I created a master report and a subreport. When I compile the master report, the static text from the subreport appears correctly. However, the data fields in my subreport are not being filled in. I would assume that this has something to do with my subreport 'Connection Expression'. Per the JasperReports documentation and example, I set this to $P{REPORT_CONNECTION}, assuming that it would then use the same connection as the master report. However, when I compile I receive the message:
Warning: The supplied java.sql.Connection object is null.
And the subreport data fields are not appearing on the report.
Can anyone offer any help? Forgive me if I sound ignorant as I am trying to grasp these concepts which are all fairly new to me.
Thank You.
By: Giulio Toffoli - gt78
RE: A Subreport Question
2003-02-22 01:52
Ciao Jay,
Leave blank the query field in the compilation window. In this way, IReportCompiler pass the connection as Parameter to jasperReport filler, and not only the ResultSet, that is not useful for generating subreports and cause the Warning: The supplied java.sql.Connection object is null.
Good Luck
Giulio
By: Jay Fleck - jayf23
RE: A Subreport Question
2003-02-24 07:24
That worked!
Thank you very much, Giulio.
-Jay
A Subreport Question
2003-02-21 15:05
I created a master report and a subreport. When I compile the master report, the static text from the subreport appears correctly. However, the data fields in my subreport are not being filled in. I would assume that this has something to do with my subreport 'Connection Expression'. Per the JasperReports documentation and example, I set this to $P{REPORT_CONNECTION}, assuming that it would then use the same connection as the master report. However, when I compile I receive the message:
Warning: The supplied java.sql.Connection object is null.
And the subreport data fields are not appearing on the report.
Can anyone offer any help? Forgive me if I sound ignorant as I am trying to grasp these concepts which are all fairly new to me.
Thank You.
By: Giulio Toffoli - gt78
RE: A Subreport Question
2003-02-22 01:52
Ciao Jay,
Leave blank the query field in the compilation window. In this way, IReportCompiler pass the connection as Parameter to jasperReport filler, and not only the ResultSet, that is not useful for generating subreports and cause the Warning: The supplied java.sql.Connection object is null.
Good Luck
Giulio
By: Jay Fleck - jayf23
RE: A Subreport Question
2003-02-24 07:24
That worked!
Thank you very much, Giulio.
-Jay
2 Answers:
Posted on March 8, 2010 at 5:05am
hey guys...
i too have the same problem. My sub-report data is not being displayed. But my master report is displaying data. On the console getting following error -- "warning :the supplied java.sql.connection object is null in subreports"
Please help me out.. thanks in advance
i too have the same problem. My sub-report data is not being displayed. But my master report is displaying data. On the console getting following error -- "warning :the supplied java.sql.connection object is null in subreports"
Please help me out.. thanks in advance