Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » How to auto-number list items
How to auto-number list items [message #151130] Wed, 05 April 2006 15:16 Go to next message
Steve Gutz is currently offline Steve GutzFriend
Messages: 70
Registered: July 2009
Member
I have a list with several nested groupings and would like to auto-number
them. For example:

1.0 Group A
1.1 Group A1
1.1.1 List item A1a
1.1.2 List item A1b
1.1.3 List item A1c
1.2 Group A2
1.3 Group A3
2.0 Group B
..
..
..

Is this possible?
Re: How to auto-number list items [message #151241 is a reply to message #151130] Wed, 05 April 2006 20:32 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

Steve,

I dont believe there is an auto number, but you can do something like:

Add your group
1 - Select the group row and select script.
2 - Enter grnumber = 0.9; in the onPrepare method.
3 - Select the group data element (For example row["country"]) and double
click it to bring up the expression builder.
4 - Enter the following for the expression.
grnumber = grnumber + 0.1;
grnumber.toFixed(1) + " " + row["country"];

This will produce something like this,

1.0 Australia
detail row
detail row
detail row
detail row
1.1 Austria
detail row
detail row
detail row
etc

You should be able to repeat this for nested groups.

Jason

"Steve Gutz" <sgutz@ca.ibm.com> wrote in message
news:e10n01$p2q$1@utils.eclipse.org...
>I have a list with several nested groupings and would like to auto-number
> them. For example:
>
> 1.0 Group A
> 1.1 Group A1
> 1.1.1 List item A1a
> 1.1.2 List item A1b
> 1.1.3 List item A1c
> 1.2 Group A2
> 1.3 Group A3
> 2.0 Group B
> .
> .
> .
>
> Is this possible?
>
>
Previous Topic:NullPointer Error in Running SalesReport of org.eclipse.birt.chart.examples
Next Topic:pie chart from columns of strings
Goto Forum:
  


Current Time: Sat Jul 27 16:21:09 GMT 2024

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

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

Back to the top