Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Grouping problem
Grouping problem [message #546869] Wed, 14 July 2010 12:45 Go to next message
Eclipse User
Originally posted by: pschoenb.gmx.de

Hi,

I have three data set fields (all of type string): header, name, and
data.

My header is a string that starts with a section number, though, like:

1.2.13. Sample header

Several adjacent rows, consisting of different name/data pairs can share
the same header. If this is the case, I want the header to be displayed
once only. That means, I want a layout like:

header
-------------------
| name 1 | data 1 |
-------------------
| name 2 | data 2 |
-------------------

I tried using a group for the header, but then, the header gets sorted,
which shuffles my sections, since it sorts lexically and not
numerically.

How can I achieve this layout without the header getting sorted?

--
Regards,
Patrick

--
email: pschoenb@gmx.de
PGP public key available. Key ID: 0B7DDE39
Or email to pgp@robustsoft.de with subject 'pschoenb'.
Fingerprint: BE80 0E7E B68E CE99 623C 902D 62A6 806A 0B7D DE39
Re: Grouping problem [message #546878 is a reply to message #546869] Wed, 14 July 2010 13:35 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. Polunsky
Messages: 199
Registered: July 2009
Location: Houston TX
Senior Member

I would create an additional field in my dataset representing the header in a format that can be sorted - something like 00001-00002-00013 for the item you show. Since your header is a string, you should be able to do that either in the underlying SQL with its string manipulation functions or at the BIRT dataset layer with the javascript string manips.
Re: Grouping problem [message #546959 is a reply to message #546878] Wed, 14 July 2010 17:33 Go to previous messageGo to next message
Eclipse User
Originally posted by: pschoenb.gmx.de

On Wed, 14 Jul 2010 09:36:01 -0400, Richard A. Polunsky wrote:

> I would create an additional field in my dataset representing the
> header in a format that can be sorted - something like
> 00001-00002-00013 for the item you show. Since your header is a
> string, you should be able to do that either in the underlying SQL
> with its string manipulation functions or at the BIRT dataset layer
> with the javascript string manips.

I tried that. However, if I create a group on header and add the new
sort key in the sorting tab of the group, it still sorts lexically on
the header.

Why?

--
Regards,
Patrick

--
email: pschoenb@gmx.de
PGP public key available. Key ID: 0B7DDE39
Or email to pgp@robustsoft.de with subject 'pschoenb'.
Fingerprint: BE80 0E7E B68E CE99 623C 902D 62A6 806A 0B7D DE39
Re: Grouping problem [message #546969 is a reply to message #546869] Wed, 14 July 2010 18:46 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. Polunsky
Messages: 199
Registered: July 2009
Location: Houston TX
Senior Member

It sorts lexically because the item is a string. You could, I suppose, create three auxiliary integer fields and do a combination key sort, but I showed the section number as zero-padded to guarantee that the lexical sort would match the hierarchical numeric sort. The zero-padding is required to make that work.
Re: Grouping problem [message #547084 is a reply to message #546969] Thu, 15 July 2010 11:16 Go to previous message
Eclipse User
Originally posted by: pschoenb.gmx.de

On Wed, 14 Jul 2010 14:46:37 -0400, Richard A. Polunsky wrote:

> It sorts lexically because the item is a string. You could, I
> suppose, create three auxiliary integer fields and do a combination
> key sort, but I showed the section number as zero-padded to guarantee
> that the lexical sort would match the hierarchical numeric sort. The
> zero-padding is required to make that work.

I wrote:

> I tried that. However, if I create a group on header and add the new
> sort key in the sorting tab of the group, it still sorts lexically on
> the header.
>
> Why?

That means, I created the zero-padded key and added it to the "Sorting
tab" of my group, but I do not see any change yet.

--
Regards,
Patrick

--
email: pschoenb@gmx.de
PGP public key available. Key ID: 0B7DDE39
Or email to pgp@robustsoft.de with subject 'pschoenb'.
Fingerprint: BE80 0E7E B68E CE99 623C 902D 62A6 806A 0B7D DE39
Previous Topic:JDBC Mysql connection
Next Topic:Federal BIRT Competition
Goto Forum:
  


Current Time: Fri Oct 31 07:18:04 GMT 2014

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

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