Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Consecutive Group and Detail group row number
rgiapratam
How to get report like this (consecutive group row number and consecutive detail group row number) :
1 | Group A
___1 | group child A 1
___2 | group child A 2
2 | Group B
___1 | group child B 1
3 | Group C
___1 | group child C 1
___2 | group child C 2
___3 | group child C 3
Thx.
Find more posts tagged with
Comments
bhanley
I used a set of <em class='bbc'>Persistent Global Variables</em> to track the row counts at the Group and detail level. I rendered the counts to the screen via a Dynamic Text entry at the Group and Detail level. <br />
<br />
The code looks like this (Group Level):<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var Count = reportContext.getPersistentGlobalVariable("GrpCnt");
Count++;
reportContext.setPersistentGlobalVariable("GrpCnt", Count.toString());
reportContext.setPersistentGlobalVariable("DetailCnt", "0");
Count.toString()</pre>
<br />
The only real difference between the two Dynamic Text blocks is that when the Group count is incremented, the Detail count is re-set.<br />
<br />
Both Persistent Global Variables are initialized on the report's initialize scripting event.<br />
<br />
Sample Report Design and Data are attached. Built on BIRT 2.3.2.<br />
<br />
Good Luck!
Bsupport
Hi rgiapratam<br />
<br />
Insert child group in the details of the previous parent group.<br />
Hope this might help you.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Regards,<br />
Birtsupport<br />
<a class='bbc_url' href='
http://www.reportinghouse.com'>Reporting
House: Our Focus...Your Reports</a>