Skip to main content



      Home
Home » Archived » BIRT » Dynamic Sorting base on a Report Parameter (e.g. using an Cumputed Column)
Dynamic Sorting base on a Report Parameter (e.g. using an Cumputed Column) [message #243326] Tue, 19 June 2007 11:29 Go to next message
Eclipse UserFriend
Originally posted by: gerritpetersen.gmail.com

Hi,

I have a problem. Depending of a Report Parameter, I want to sort the
dataset. The Report Parameter can have 6 value. Each value points to a
dataset field.

E.g. within the dataset 6 fields are read. field1 ... field6.
The report parameter defines which field is used to order.

So I thought to create a Computed Column (Named: Sorting) and include in the
query: "order by FIELDA, FIELDB, Sorting".

This (of course) gives an error. Is their a way to sort on a Computed Column
(or an other way of dynamical change the sorting).On such a way that also
the Preview Result of the dataset also shows the 'new' ordered data. (since
the query is rather complex and used in a Joint-Data Set.

THANKS IN ADVANCED!
Re: Dynamic Sorting base on a Report Parameter (e.g. using an Cumputed Column) [message #243640 is a reply to message #243326] Wed, 20 June 2007 14:10 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jasonweathersby.alltel.net

Take a look at this example:

http://wiki.eclipse.org/Example_-_Sort_Table_based_on_parame ter_%28BIRT%29

Jason

GP wrote:
> Hi,
>
> I have a problem. Depending of a Report Parameter, I want to sort the
> dataset. The Report Parameter can have 6 value. Each value points to a
> dataset field.
>
> E.g. within the dataset 6 fields are read. field1 ... field6.
> The report parameter defines which field is used to order.
>
> So I thought to create a Computed Column (Named: Sorting) and include in the
> query: "order by FIELDA, FIELDB, Sorting".
>
> This (of course) gives an error. Is their a way to sort on a Computed Column
> (or an other way of dynamical change the sorting).On such a way that also
> the Preview Result of the dataset also shows the 'new' ordered data. (since
> the query is rather complex and used in a Joint-Data Set.
>
> THANKS IN ADVANCED!
>
>
Re: Dynamic Sorting base on a Report Parameter (e.g. using an Cumputed Column) [message #243783 is a reply to message #243640] Thu, 21 June 2007 02:35 Go to previous message
Eclipse UserFriend
You can sort in the table that displays the data set and simply use an
indirection for the sorting key: sort on

row[params["sortingColumn"]]

With a string param with combo box selection you should be able to have a
static list of choices that have a proper display text and map to the
correct column name.

Olaf


> Take a look at this example:

> http://wiki.eclipse.org/Example_-_Sort_Table_based_on_parame ter_%28BIRT%29

> Jason

> GP wrote:
>> Hi,
>>
>> I have a problem. Depending of a Report Parameter, I want to sort the
>> dataset. The Report Parameter can have 6 value. Each value points to a
>> dataset field.
>>
>> E.g. within the dataset 6 fields are read. field1 ... field6.
>> The report parameter defines which field is used to order.
>>
>> So I thought to create a Computed Column (Named: Sorting) and include in
the
>> query: "order by FIELDA, FIELDB, Sorting".
>>
>> This (of course) gives an error. Is their a way to sort on a Computed
Column
>> (or an other way of dynamical change the sorting).On such a way that also
>> the Preview Result of the dataset also shows the 'new' ordered data. (since
>> the query is rather complex and used in a Joint-Data Set.
>>
>> THANKS IN ADVANCED!
>>
>>
Previous Topic:rcp generate pdf report
Next Topic:Exception in eclipse report designer on scripted data source preview results
Goto Forum:
  


Current Time: Fri Jul 18 22:45:50 EDT 2025

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

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

Back to the top