sub report on page header

By: lovish Durbha - lovish
sub report on page header
2003-01-22 08:28
I need to show data of a sub report only once in the report at page header.

is it possible..........please guide.

thanks in advance
Lovish




By: Teodor Danciu - teodord
RE: sub report on page header
2003-01-22 09:25

Hi,

You simply place the subreport on the page header
an maybe use its <printWhenExpression>
to display it only once, on the first page or whatever.
If it is about displaying it only on the first page,
then you might as wel consider placing it on the
title section of the report.

For details about how to use subreports, check
the supplied "subreport" sample.

I hope this helps.
Teodor





By: lovish Durbha - lovish
RE: sub report on page header
2003-01-22 09:45
ur right I need only once.....I tried placing subreport on title but it never finished compiling, then I put it on title and changed the subreport band to details then data is visible but report design goes for a toss.........

and what should the "print when expresion " have?

Its urgent..............


thanks
Lovish






By: lovish Durbha - lovish
RE: sub report on page header
2003-01-22 09:47
ur right I need only once.....I tried placing subreport on title but it never finished compiling, then I put it on title and changed the subreport band to details then data is visible but report design goes for a toss.........

and what should the "print when expresion " have?

Its urgent..............


thanks
Lovish






By: Teodor Danciu - teodord
RE: sub report on page header
2003-01-22 09:55

Hi,

It would be interesting to see the report compilation
error before going to complicate things with the
printWhenExpression.
However, such an expression should check the
PAGE_NUMBER variable like this:

<printWhenExpression>
new Boolean($V{PAGE_NUMBER}.intValue() == 1)
</printWhenExpression>

I hope this helps.
Teodor





By: lovish Durbha - lovish
RE: sub report on page header
2003-01-22 10:07
Teodor,

unless the subreport is placed in detail band ................subreport is blank. I tried with print when expression aswell

thanks
Lovish




By: lovish Durbha - lovish
RE: sub report on page header
2003-01-22 10:22
I was wondering if u have a email to which i can send the report ......it would be easy for u to understand...................never mind if u cannot give.


thanks
Lovish









By: Teodor Danciu - teodord
RE: sub report on page header
2003-01-22 23:36

Hi,

You can send me the file at this address:

teodord@hotmail.com

Thank you,
Teodor





By: Teodor Danciu - teodord
RE: sub report on page header
2003-01-26 23:44

Hi,

You are no supplying to your report any
data source.
You are only supplying a parameter
called "InvoiceNumber" and I'm not sure what
the subreport is supposed to do with it.

You have to use either <connectionExpression>
or <dataSourceExpresison> tags so that the
subreport could iterate on something.
Since I see that the subreport does not have
an SQL query, I guess it is the
<dataSourceExpression> that you nees to pass
in to the subreport a custom JRDataSource object.

Anyway, if you want a report/subreport to generate
something even if there are no records in the data
source (null data source in you case),
use whenNoDataType="AllSectionsNoDetail".
If you do that for your subreport, you can see it
is there, but it has no records.

I hope this helps.
Teodor





By: lovish Durbha - lovish
RE: sub report on page header
2003-01-23 01:55
thanks teodord for your support. I have sent xml files to your mail please revert back.

Lovish
2002 JI Open Discussion's picture
Joined: Aug 10 2006 - 3:28am
Last seen: 16 years 10 months ago

0 Answers:

No answers yet
Feedback