Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » How to repeat a row on each new page ?
How to repeat a row on each new page ? [message #740172] Tue, 18 October 2011 08:27 Go to next message
guif007lepro is currently offline guif007lepro
Messages: 6
Registered: October 2011
Junior Member
Hi everybody,

I would like to know if there is a way to do that :

PAGE 1

HEADER
Title 1
Item 1
Item 2
Item 3
Item 4
Title 2
Item 1
Item 2
FOOTER

Page 2
HEADER
Title 2 (Next)
Item 3
Item 4
Title 3
Item 1
Item 2
Item 3
FOOTER

Right now, I can't add Title 2 on page 2. I'm using BIRT 2.6.2.

Thx in advance,
GuiF007

[Updated on: Tue, 18 October 2011 08:27]

Report message to a moderator

Re: How to repeat a row on each new page ? [message #740605 is a reply to message #740172] Tue, 18 October 2011 17:50 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Could you use a page var and script and put it in the page header. See
atttached.

Jason

On 10/18/2011 4:27 AM, guif007lepro wrote:
> Hi everybody,
>
> I would like to know if there is a way to do that :
>
> PAGE 1
>
> HEADER
> Title 1
> Item 1
> Item 2
> Item 3
> Item 4
> Title 2
> Item 1
> Item 2
> FOOTER
>
> Page 2
> HEADER
> Title 2 (Next)
> Item 3
> Item 4
> Title 3
> Item 1
> Item 2
> Item 3
> FOOTER
>
> Right now, I can't add Title 2 on page 2. I'm using BIRT 2.6.2.
>
> Thx in advance,
> GuiF007
  • Attachment: pagevar.zip
    (Size: 3.21KB, Downloaded 176 times)
Re: How to repeat a row on each new page ? [message #741535 is a reply to message #740605] Wed, 19 October 2011 16:15 Go to previous messageGo to next message
guif007lepro is currently offline guif007lepro
Messages: 6
Registered: October 2011
Junior Member
The header and footer I was talking about were those of a table. Does it these one you were talking about ? Anyway, I will try this solution, I let you know.

[Updated on: Wed, 19 October 2011 16:16]

Report message to a moderator

Re: How to repeat a row on each new page ? [message #741550 is a reply to message #741535] Wed, 19 October 2011 16:30 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

No, I do not have an example of using it in a group header.

Jason

On 10/19/2011 12:15 PM, guif007lepro wrote:
> The header and footer I was talking about was those of a table. Does it
> this one you were talking about ? Anyway, I will try this solution, I
> let you know.
Re: How to repeat a row on each new page ? [message #742348 is a reply to message #741550] Thu, 20 October 2011 12:16 Go to previous messageGo to next message
guif007lepro is currently offline guif007lepro
Messages: 6
Registered: October 2011
Junior Member
Anyway, I will try to add one row in my table with that title if it's not possible to insert it in the group header.
Re: How to repeat a row on each new page ? [message #742493 is a reply to message #742348] Thu, 20 October 2011 14:45 Go to previous messageGo to next message
guif007lepro is currently offline guif007lepro
Messages: 6
Registered: October 2011
Junior Member
I reach to display something each beginning of page (Except the first and second page page), but not the title, I received just null each time...

My structure is this one :
- On table to display title (called TABLE1)
- On each row of this table, I have one table to display items (called TABLE2)

I manage to display something really nice in TABLE2 header group.
<data id="1512">
                                                        <list-property name="boundDataColumns">
                                                            <structure>
                                                                <property name="name">cont</property>
                                                                <text-property name="displayName">cont</text-property>
                                                                <expression name="expression" type="javascript">vars["cont"]</expression>
                                                                <property name="dataType">string</property>
                                                            </structure>
                                                        </list-property>
                                                        <property name="resultSetColumn">cont</property>
                                                    </data>


On report tag, I have :
<method name="onPageStart"><![CDATA[reportContext.setPageVariable("cont","Last Page Ended with "+ reportContext.getGlobalVariable("lst"));]]></method>


On pageBreak table that display items under title (TABLE2), I have :
<method name="onPageBreak"><![CDATA[reportContext.setGlobalVariable("lst", row["title"]);]]></method>


The problem I have it's I received null for lst global variable.

[Updated on: Thu, 20 October 2011 14:55]

Report message to a moderator

Re: How to repeat a row on each new page ? [message #742566 is a reply to message #742493] Thu, 20 October 2011 16:00 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason Weathersby
Messages: 9167
Registered: July 2009
Senior Member

Take a look at this thread:
http://www.eclipse.org/forums/index.php/m/498336/#msg_498336

Jason

On 10/20/2011 10:45 AM, guif007lepro wrote:
> I reach to display something each beginning of page (Except the second
> page ?!? (and the first, but normal)), but not the title, I received
> just null each time...
>
> My structure is this one :
> - On table to display title (called TABLE1)
> - On each row of this table, I have one table to display items (called
> TABLE2)
>
> I manage to display something really nice in TABLE2 header group.
> <data id="1512">
> <list-property name="boundDataColumns">
> <structure>
> <property name="name">cont</property>
> <text-property name="displayName">cont</text-property>
> <expression name="expression" type="javascript">vars["cont"]</expression>
> <property name="dataType">string</property>
> </structure>
> </list-property>
> <property name="resultSetColumn">cont</property>
> </data>
>
> On report tag, I have :
> <method
> name="onPageStart"><![CDATA[reportContext.setPageVariable("cont","Last
> Page Ended with "+ reportContext.getGlobalVariable("lst"));]]></method>
>
> On pageBreak table that display items under title (TABLE2), I have :
> <method
> name="onPageBreak"><![CDATA[reportContext.setGlobalVariable("lst",
> row["title"]);]]></method>
>
> The problem I have it's I received null for lst global variable.
>
Re: How to repeat a row on each new page ? [message #742578 is a reply to message #742493] Thu, 20 October 2011 16:10 Go to previous message
guif007lepro is currently offline guif007lepro
Messages: 6
Registered: October 2011
Junior Member
OK... Why looking for something really tough as it's really easy...

In header TABLE2 (see above), I simply took the title from the dataset TABLE1... Pffff....
Previous Topic:BIRT 2.5.1 cuts off font at auto text when generating a PDF
Next Topic:How to set chart series name in javascript
Goto Forum:
  


Current Time: Thu Oct 23 00:41:36 GMT 2014

Powered by FUDForum. Page generated in 0.02370 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software