if you are not looking for generic approach and specific to one or two datawindows then I would recommend below. Because writing a code in rerieveend will always slower your performance where there are lots of data to retrieve.
1. Say your datawindow has group on region. Now put below computed column cf_groups in detail band
cumulativesum ( if (region = region[-1] , 0 , 1) for all)
2. in your code get the value by
dw_1.object.cf_groups[dw_1
Regards,
Sandeep
Main Topics
Browse All Topics





by: diasroshanPosted on 2009-05-19 at 00:11:42ID: 24419228
Hi,
num + 1, 1)
Put this script in the RetrieveEnd event of your DataWindow or DataStore to count the initial number of group breaks for the number of the group for which you are searching. Groups are numbered in the order that you define them. Anytime the group is recalculated this count should be repeated.
long l_rownum = 1
long l_TotalGroupBreaks = 0
do while l_rownum > 0
l_rownum = this.FindGroupChange(l_row
// The FindGroupChange function searches for the next break for the specified group. A
// group break occurs when the value of the column for the group changes. In the above
// use of the FindGroupChange function the number of breaks for group level 1 is totalled.
l_TotalGroupBreaks++
loop
Cheers,
Rosh