Sorting [message #362886] |
Thu, 29 May 2008 16:57  |
Eclipse User |
|
|
|
Hi all,
I've run into a sorting issue I would appreciate some help on.
Say I have a 2x2 grid. The first column has a label I put in and the
second column has two tables deriving the data from the same data set but
using a different parameter.
For example:
SELECT number FROM table WHERE date = ?
"date1" => "222"
"date2" => "111"
The grid would look like this:
Label Table w/ Data
-------------------
| A | 222 |
-------------------
| B | 111 |
-------------------
How can I add a sort where the rows are displayed based on the ascending
value of the second column? It would end up looking like this:
-------------------
| B | 111 |
-------------------
| A | 222 |
-------------------
I've tried multiple things, like selecting both tables at the same time.
I've tried adding a sort parameter by selecting the tables individually,
however that doesn't do anything when I hit "preview".
Any advice or hints?
Thanks!
Ameena
|
|
|
|
Re: Sorting [message #362889 is a reply to message #362888] |
Thu, 29 May 2008 18:16   |
Eclipse User |
|
|
|
Hi BG,
Sorry if I did not write it clear enough. Let me try again.
I have a 2x2 GRID (not a table):
-----------
| A1 | A2 |
-----------
| B1 | B2 |
------------
In A1 and B1, I have a label that I've added.
In A2 and B2 however, I've added a 1x1 TABLE to each section. So 2 tables
total. Each table is bounded to the same exact Data Set but with a
different parameter.
For example the data set has the sql query: SELECT number FROM table WHERE
date=?
So when I hit preview, I would get this
-------------
| A1 | 222 |
-------------
| B1 | 111 |
--------------
So I would like to know how to apply a sort where the resultant data in a
whole column is taken into consideration. I'd like to avoid adding an
"order by" column to my sql statement since in reality, I may have
completely different sql statements. So I would hope that BIRT could sort
based on the final numbers (like in A2 and B2) and I would end up with
this:
-------------
| B1 | 111 |
-------------
| A1 | 222 |
--------------
I hope this explanation makes more sense.
Also, could you expound on this statement: "of course you could
parameterize either the column(s) to sort on or the direction".
Thanks,
Ameena
badguy wrote:
> Ameena.
> I dont quite understand your question. In particular you said "both
> tables" but I only see one.
> Not sure if this answers your question, but in your dataset sql query
> you could add ... ORDER BY date1 ASC, date2 DESC .. or something
> similiar.
> of course you could parameterize either the column(s) to sort on or the
> direction.
> bg
|
|
|
|
Re: Sorting [message #362911 is a reply to message #362906] |
Fri, 30 May 2008 10:54  |
Eclipse User |
|
|
|
Hi BG,
Thanks for attempting to answer. I'm going to post the question again to
the board and use part of your response in my question, since I think I
made it too complicated by giving an example of what I was trying to do! :)
Ameena
|
|
|
Powered by
FUDForum. Page generated in 0.26412 seconds