Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Numbering a grouped table
Numbering a grouped table [message #196459] Thu, 19 October 2006 13:12 Go to next message
Eclipse UserFriend
Originally posted by: screek.gmx.de

Hello,

I want to use numbering in a grouped table like this:
1. GroupHeaderRow
1.1 DetailRow
1.2 DetailRow
2. GroupHeaderRow
2.1 DetailRow
....

Does anyone know how I can do this using the BIRT 2.1.1 Report Designer?
For a simple table without groups I can use row.__rownum. One solution would
be to use boxed tables, but I would prefer to use one grouped table.


Thanks for any advice,

Christian
Re: Numbering a grouped table [message #196747 is a reply to message #196459] Fri, 20 October 2006 08:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brell.oio.de

Hi,

don t know if it s the easiest way to do it but it should work by using two

JS-variables.



In your group table in onPrepare EventHandler:

groupNum=0;

rowNum=0;



In your groupHeaderRow onPrepare:

groupNum++;

rowNum=0;



In your detailRow onPrepare:

rowNum++;



Now you can add dynamicText to GroupHeader:

groupNum+"."+row["yourGroupTitle"]

and to detailRow:

groupNum+"."+"rowNum+"."+row["yourDetailToDisplay"]

Hope this works.

Christian
Re: Numbering a grouped table [message #196778 is a reply to message #196747] Fri, 20 October 2006 12:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brell.oio.de

Sorry onPrepare don't make sense. It should be onCreate.


"Christian Brell" <brell@oio.de> schrieb im Newsbeitrag
news:eha0ma$vg0$1@utils.eclipse.org...
> Hi,
>
> don t know if it s the easiest way to do it but it should work by using
two
>
> JS-variables.
>
>
>
> In your group table in onPrepare EventHandler:
>
> groupNum=0;
>
> rowNum=0;
>
>
>
> In your groupHeaderRow onPrepare:
>
> groupNum++;
>
> rowNum=0;
>
>
>
> In your detailRow onPrepare:
>
> rowNum++;
>
>
>
> Now you can add dynamicText to GroupHeader:
>
> groupNum+"."+row["yourGroupTitle"]
>
> and to detailRow:
>
> groupNum+"."+"rowNum+"."+row["yourDetailToDisplay"]
>
> Hope this works.
>
> Christian
>
>
Re: Numbering a grouped table [message #196786 is a reply to message #196778] Fri, 20 October 2006 13:21 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: screek.gmx.de

Hi,

thanks for your advice, I will test this today and give feedback.


Greets,
Christian


"Christian Brell" <brell@oio.de> wrote in message
news:ehafb0$otk$1@utils.eclipse.org...
> Sorry onPrepare don't make sense. It should be onCreate.
>
>
> "Christian Brell" <brell@oio.de> schrieb im Newsbeitrag
> news:eha0ma$vg0$1@utils.eclipse.org...
>> Hi,
>>
>> don t know if it s the easiest way to do it but it should work by using
> two
>>
>> JS-variables.
>>
>>
>>
>> In your group table in onPrepare EventHandler:
>>
>> groupNum=0;
>>
>> rowNum=0;
>>
>>
>>
>> In your groupHeaderRow onPrepare:
>>
>> groupNum++;
>>
>> rowNum=0;
>>
>>
>>
>> In your detailRow onPrepare:
>>
>> rowNum++;
>>
>>
>>
>> Now you can add dynamicText to GroupHeader:
>>
>> groupNum+"."+row["yourGroupTitle"]
>>
>> and to detailRow:
>>
>> groupNum+"."+"rowNum+"."+row["yourDetailToDisplay"]
>>
>> Hope this works.
>>
>> Christian
>>
>>
>
>
Re: Numbering a grouped table [message #196794 is a reply to message #196786] Fri, 20 October 2006 13:47 Go to previous message
Eclipse UserFriend
Originally posted by: screek.gmx.de

Hi again,

thanks a lot! It's working just as it supposed to be. It's a simple yet
effective solution.


Greets,
Christian

"Christian Eckert" <screek@gmx.de> wrote in message
news:ehaigv$b5f$1@utils.eclipse.org...
> Hi,
>
> thanks for your advice, I will test this today and give feedback.
>
>
> Greets,
> Christian
>
>
> "Christian Brell" <brell@oio.de> wrote in message
> news:ehafb0$otk$1@utils.eclipse.org...
>> Sorry onPrepare don't make sense. It should be onCreate.
>>
>>
>> "Christian Brell" <brell@oio.de> schrieb im Newsbeitrag
>> news:eha0ma$vg0$1@utils.eclipse.org...
>>> Hi,
>>>
>>> don t know if it s the easiest way to do it but it should work by using
>> two
>>>
>>> JS-variables.
>>>
>>>
>>>
>>> In your group table in onPrepare EventHandler:
>>>
>>> groupNum=0;
>>>
>>> rowNum=0;
>>>
>>>
>>>
>>> In your groupHeaderRow onPrepare:
>>>
>>> groupNum++;
>>>
>>> rowNum=0;
>>>
>>>
>>>
>>> In your detailRow onPrepare:
>>>
>>> rowNum++;
>>>
>>>
>>>
>>> Now you can add dynamicText to GroupHeader:
>>>
>>> groupNum+"."+row["yourGroupTitle"]
>>>
>>> and to detailRow:
>>>
>>> groupNum+"."+"rowNum+"."+row["yourDetailToDisplay"]
>>>
>>> Hope this works.
>>>
>>> Christian
>>>
>>>
>>
>>
>
>
Previous Topic:Deploying BIRT in J2EE Application Servers
Next Topic:pie chart and translation table for categories defined by code
Goto Forum:
  


Current Time: Thu Mar 28 10:53:50 GMT 2024

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

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

Back to the top