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.
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.
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.
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.