Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » deleting empty rows
deleting empty rows [message #533356] Thu, 13 May 2010 13:53 Go to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
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 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 Go to previous messageGo to next message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

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 #533482 is a reply to message #533368] Fri, 14 May 2010 08:39 Go to previous messageGo to next message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
Hi Richard and Jason,

thanks for reply. I'll try to do what you suggest me, but the fact is, that I must however group data.
In example:

ID Name Year
-------------------------------
10 John 1983
10 John 1983
10 John 1983
11 Dany 1983
11 Dany 1983
12 Mark 1983
12 Mark 1983

when I, in some way, filter data and get only three:

ID Name Year
-------------------------------
10 John 1983
11 Dany 1983
12 Mark 1983

I will need to group them by Year. So, my question is, will I be able to group them again even they are already grouped as you suggested me in previous post?

Regards,
Re: deleting empty rows [message #533528 is a reply to message #533356] Fri, 14 May 2010 13:04 Go to previous messageGo to next message
Richard A. Polunsky is currently offline Richard A. PolunskyFriend
Messages: 212
Registered: July 2009
Location: Houston TX
Senior Member

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

Re: deleting empty rows [message #540187 is a reply to message #533528] Tue, 15 June 2010 10:30 Go to previous message
mkrivic Mising name is currently offline mkrivic Mising nameFriend
Messages: 33
Registered: May 2010
Member
Hi Richard and Jason,

I successfully done what you suggested me, and now everything works fine. Sorry for not answering on post, I was on vacation.

Any way, thanks!

Milan
Previous Topic:Integrate BIRT in WAS 6.0
Next Topic:Error connecting BIRT and DB2
Goto Forum:
  


Current Time: Wed Sep 25 13:43:13 GMT 2024

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

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

Back to the top