Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Row numbers for crosstab in a table
Row numbers for crosstab in a table [message #986652] Wed, 21 November 2012 10:02 Go to next message
Prashant Jha is currently offline Prashant JhaFriend
Messages: 18
Registered: September 2011
Junior Member
I have a cross tab inside a table. The table is grouped on a 'x'. The cross tab is filtered on 'x' being equal to cross tab y being equal to 'x'... More precisely...
dimension["grp_table"]["CLASSFN1"] = row._outer["TABLENAME"]...
This filters the cross tab data to only the ones for which table is grouped for.
Now I need to show a column in Cross tab giving the row numbers. I had a computed column in the data set of data cube fetching the group number. But due to filtering, the row numbers now shown is all non - serial. How can I get serial group numbers.
I tried reportContext.setGlobalData() in createCrossTab script, incrementing the variable in OnCreateCell, and showing the value i.e reportContext.getGlobalVariable("rowN") but it always shows zero.. Any solutions.
Re: Row numbers for crosstab in a table [message #986854 is a reply to message #986652] Thu, 22 November 2012 04:14 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You're wanting to have a running count on the rows in each crosstab, 1-n? Or a running count on the embedded crosstabs? Can you make an example with the sample database that shows the problem you're having? You should be able to simply increment a variable in a dynamic text box or something, but maybe I'm misunderstanding.

Michael

Developer Evangelist, Silanis
Re: Row numbers for crosstab in a table [message #986860 is a reply to message #986854] Thu, 22 November 2012 06:48 Go to previous messageGo to next message
Prashant Jha is currently offline Prashant JhaFriend
Messages: 18
Registered: September 2011
Junior Member
I want a running count on the rows of each crosstab 1-n.
Re: Row numbers for crosstab in a table [message #987160 is a reply to message #986860] Fri, 23 November 2012 22:02 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Try this: In the initialize event, put something like rCount=0; Then, in the onCreate of the outer table's row, where the crosstab is embedded, put the same. Finally, in a dynamic text box, in your crosstab dimension area, increment rCount and display it. This should cause the rCount variable to increment for each row, then to reset for each new outer table group. Let me know.

Michael

Developer Evangelist, Silanis
Re: Row numbers for crosstab in a table [message #1000754 is a reply to message #987160] Tue, 15 January 2013 11:38 Go to previous messageGo to next message
Elena M is currently offline Elena MFriend
Messages: 12
Registered: January 2013
Junior Member
it is not work

I need to number a rows too..

can you help?


Re: Row numbers for crosstab in a table [message #1000999 is a reply to message #1000754] Tue, 15 January 2013 20:53 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Can you attach an example, showing what you've done, that uses the sample database? This way, I can see exactly what you're looking at and modify your example.

Michael

Developer Evangelist, Silanis
Re: Row numbers for crosstab in a table [message #1001775 is a reply to message #1000999] Thu, 17 January 2013 11:00 Go to previous messageGo to next message
Elena M is currently offline Elena MFriend
Messages: 12
Registered: January 2013
Junior Member
maybe there are a standart solution (any typical steps?) to insert number rows in cross tab?
Re: Row numbers for crosstab in a table [message #1004184 is a reply to message #1001775] Tue, 22 January 2013 18:53 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

I thought I had made a general example on a way to do this and posted it in the BIRT-Exchange devShare, but I can't seem to find it. I'll make a simple example and post it, then link it in here.

Michael

Developer Evangelist, Silanis
Re: Row numbers for crosstab in a table [message #1004191 is a reply to message #1004184] Tue, 22 January 2013 19:13 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

Here it is:

BIRT Exchange DevShare - Crosstab Row Number Example


Michael

Developer Evangelist, Silanis
Re: Row numbers for crosstab in a table [message #1005855 is a reply to message #1004191] Tue, 29 January 2013 05:43 Go to previous messageGo to next message
Elena M is currently offline Elena MFriend
Messages: 12
Registered: January 2013
Junior Member
Thank you very much for anser!!!!
it works good
Smile
Re: Row numbers for crosstab in a table [message #1006033 is a reply to message #1005855] Tue, 29 January 2013 15:38 Go to previous messageGo to next message
Michael Williams is currently offline Michael WilliamsFriend
Messages: 1925
Registered: July 2009
Senior Member

You're welcome. Glad to help!

Michael

Developer Evangelist, Silanis
Re: Row numbers for crosstab in a table [message #1740697 is a reply to message #986652] Wed, 17 August 2016 11:16 Go to previous messageGo to next message
Parag Warkar is currently offline Parag WarkarFriend
Messages: 71
Registered: August 2016
Member
Hi,

I have understood your advise, for adding the rownumber.
Thanks a lot.
There is little more requirement in my case where, i want to reset my rownumber to start it again from zero, group-wise.
Re: Row numbers for crosstab in a table [message #1740810 is a reply to message #1740697] Thu, 18 August 2016 16:33 Go to previous messageGo to next message
Parag Warkar is currently offline Parag WarkarFriend
Messages: 71
Registered: August 2016
Member
Parag Warkar wrote on Wed, 17 August 2016 11:16
Hi,

I have understood your advise, for adding the rownumber.
Thanks a lot.
There is little more requirement in my case where, i want to reset my rownumber to start it again from zero, group-wise.


I have a product category wise, list of products and their sales count in quantity, in my cross tab. I want to display rownumber to products.
This rownumber will be reset and starts again for every new category.

Please help me on this

Re: Row numbers for crosstab in a table [message #1802633 is a reply to message #1740810] Wed, 13 February 2019 03:29 Go to previous message
Siew Yin Pang is currently offline Siew Yin PangFriend
Messages: 4
Registered: January 2019
Junior Member
I would like to have that example too but I couldn't open the link. Please help.
Previous Topic:Insert new line in Table Head Label
Next Topic:Cannot preview reports - Jetty not configured properly
Goto Forum:
  


Current Time: Tue Mar 19 07:00:24 GMT 2024

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

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

Back to the top