deleting empty rows [message #533356] |
Thu, 13 May 2010 13:53 |
mkrivic Mising name Messages: 33 Registered: May 2010 |
Member |
|
|
Hi,
I am creating some reports in BIRT, and my datasource is Jazz.
I have a situation that I am getting duplicated rows from my database table, and are show like this:
ID Name Year
-------------------------------
10 John 1983
10 John 1983
10 John 1983
11 Dany 1983
11 Dany 1983
12 Mark 1983
12 Mark 1983
etc etc...
when I count rows, I get, for example total 7 rows.
so, I want to remove duplicate rows, and get three different rows,
and count of them 3.
Actually, I would like to help about writing handler which will, for example, delete duplicate rows during rows creation.
P.S. I know I could resolve problem with sql disctinct, but unfortunately, sql is not supported yet in this Jazz version.
Thanks,
|
|
|
Re: deleting empty rows [message #533362 is a reply to message #533356] |
Thu, 13 May 2010 14:26 |
|
If you can't do it on the SQL side, then you need to group your report by ID, Name and Year, and only show the first group footer.
GROUP 1 HEADER: ID (suppress)
GROUP 2 HEADER: NAME (suppress)
GROUP 3 HEADER: YEAR (suppress)
DETAIL ROW ID ... NAME ... YEAR (suppress)
GROUP 3 FOOTER ID ... NAME ... YEAR
GROUP 3 FOOTER (suppress)
GROUP 3 FOOTER (suppress)
I think that will give you what you need.
|
|
|
Re: deleting empty rows [message #533366 is a reply to message #533356] |
Thu, 13 May 2010 14:23 |
|
If you are just using these in a birt table you could always just hide
the duplicate rows using script. If that is what you need let me know
and I will post an example.
Jason
On 5/13/2010 9:53 AM, mkrivic wrote:
> Hi,
>
> I am creating some reports in BIRT, and my datasource is Jazz.
> I have a situation that I am getting duplicated rows from my database
> table, and are show like this:
>
> ID Name Year
> -------------------------------
> 10 John 1983
> 10 John 1983
> 10 John 1983
> 11 Dany 1983
> 11 Dany 1983
> 12 Mark 1983
> 12 Mark 1983
>
> etc etc...
> when I count rows, I get, for example total 7 rows.
> so, I want to remove duplicate rows, and get three different rows,
> and count of them 3.
> Actually, I would like to help about writing handler which will, for
> example, delete duplicate rows during rows creation.
>
> P.S. I know I could resolve problem with sql disctinct, but
> unfortunately, sql is not supported yet in this Jazz version.
>
> Thanks,
|
|
|
Re: deleting empty rows [message #533368 is a reply to message #533362] |
Thu, 13 May 2010 14:29 |
|
Excellent idea Richard
On 5/13/2010 10:26 AM, Richard A. Polunsky wrote:
> If you can't do it on the SQL side, then you need to group your report
> by ID, Name and Year, and only show the first group footer.
>
> GROUP 1 HEADER: ID (suppress)
> GROUP 2 HEADER: NAME (suppress)
> GROUP 3 HEADER: YEAR (suppress)
> DETAIL ROW ID ... NAME ... YEAR (suppress)
> GROUP 3 FOOTER ID ... NAME ... YEAR
> GROUP 3 FOOTER (suppress)
> GROUP 3 FOOTER (suppress)
>
> I think that will give you what you need.
|
|
|
|
Re: deleting empty rows [message #533528 is a reply to message #533356] |
Fri, 14 May 2010 13:04 |
|
To group by year (and you're not quite clear on how you want your output to look, so this is a best guess).
GROUP 1 HEADER: YEAR (visible)
GROUP 2 HEADER: NAME (suppress)
GROUP 3 HEADER: ID (suppress)
DETAIL ROW ID ... NAME ... YEAR (suppress)
GROUP 3 FOOTER ID ... NAME
GROUP 2 FOOTER (suppress)
GROUP 1 FOOTER (suppress)
There are probably at least a half dozen similar approaches. This gives you:
1983
10 John
11 Dany
12 Mark
|
|
|
|
Powered by
FUDForum. Page generated in 0.04204 seconds