Create Compute column and set values starting from 1. Use FindGroupChange function to get row num where group is changing. Reset counter and start from 1 again.
Do While ll_Counter <= ll_RowCount
ll_Counter = 1
ll_GroupChange = dw_control.FindGroupChange (ll_Counter,level)
ll_RowNum = 0
For ll_Ctr = ll_Counter To ll_GroupChange - 1
ll_RowNum ++
dw_control.object.compute_col [ll_Ctr] = ll_RowNum
Next
ll_Counter = ll_GroupChange
Loop
Thanks for the feedback. I did it that way. I was looking for an easier way by just adding a computed field to the datawindow object that would calculate automatically without writing the code. It would be similar to using the getrow() function, but would need to start back at 1 for each group break.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.