Jump to content
Changes to the Jaspersoft community edition download ×

Subreport and JRResultSetDataSource


Recommended Posts

By: olivier bregeas - bregeras

Subreport and JRResultSetDataSource

2002-10-24 07:03

Hi

I am trying to use subreport with JRResultSetDataSource. I have a main report with 2 subreport. The first one contain a report generated from a stored procedure. The second one is an image.

If I try each report alone, there is no problem. But When I try to put them in the main report. no sub report a displayed. I try to pass ecah report using the dori.jasper.engine.JasperReport method with parametersMapExpression.

Maybe I have do something wrong?

 

Thank you very much

 

 

 

By: Teodor Danciu - teodord

RE: Subreport and JRResultSetDataSource

2002-10-25 07:00

 

Hi,

 

Have you passed the the data source object using

the <dataSourceExpression> element or at least

the connection object using the <connectionExpression>

element if they have their own internal SQL queries?

 

I hope this helps.

Teodor

 

 

 

By: Victor Amano Izawa - victorsjc

RE: Subreport and JRResultSetDataSource

2002-10-25 11:16

Hi,

 

I have the same problem, I have a main report with 2 subreport, and I compile the 3 reports in XML, but when I fill the 3 reports I got this message:

 

java.sql.SQLException: [Microsoft][sqlServer 2000 Driver for JDBC]Object has bee

n closed.

at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source

)

at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)

at com.microsoft.jdbc.base.BaseConnection.validateClosedState(Unknown So

urce)

at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Sourc

e)

at com.microsoft.jdbc.base.BaseConnection.prepareStatement(Unknown Sourc

e)

at dori.jasper.engine.util.JRQueryExecuter.executeQuery(JRQueryExecuter.

java:198)

at dori.jasper.engine.util.JRQueryExecuter.executeQuery(JRQueryExecuter.

java:131)

at dori.jasper.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:350)

at dori.jasper.engine.fill.JRFiller.fillReport(JRFiller.java:114)

at dori.jasper.engine.JasperFillManager.fillReport(JasperFillManager.jav

a:217)

at x.main(x.java:44)

 

Follow my XML code:

This code is from my Master report.

 

<subreport isUsingCache="false">

<reportElement x="215" y="10" width="200" height="20" backcolor="#FFFFDD"/>

 

<subreportParameter name="IdLinhaReal">

<subreportParameterExpression>

$F{IdMRel}

</subreportParameterExpression>

</subreportParameter>

 

<subreportParameter name="DataIniRel">

<subreportParameterExpression>

$P{DataIni}

</subreportParameterExpression>

</subreportParameter>

 

<subreportParameter name="DataFimRel">

<subreportParameterExpression>

$P{DataFim}

</subreportParameterExpression>

</subreportParameter>

 

<connectionExpression>

$P{REPORT_CONNECTION}

</connectionExpression>

 

<subreportExpression class="dori.jasper.engine.JasperReport">

$P{PtoRealizados}

</subreportExpression>

 

</subreport>

.

.

.

.

And my XML code from subreport is:

 

<parameter name="IdLinhaReal" class="java.lang.Integer"/>

<parameter name="DataIniRel" class="java.lang.String"/>

<parameter name="DataFimRel" class="java.lang.String"/>

 

What's the problem?

Thanks

Victor

S o Jos  dos Campos - SP Brazil

 

 

 

 

By: Teodor Danciu - teodord

RE: Subreport and JRResultSetDataSource

2002-10-27 13:42

 

Hi,

 

Try to use a different JDBC driver.

It seems that the one you use now closes

the connection.

That is if you do not close it yourself somehow...

 

I hope this helps.

Teodor

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