October 6, 20178 yr How to show the record number in a sub-summary layout? It should start at record 1 per group, the parts of the layout are header, sub summary and body, It should look like this Group A 1 John Doe 2 Jane Doe Group B 1 John Doe 2 Jane Doe Edited October 6, 20178 yr by chadski021
October 6, 20178 yr Thats a tricky one. You may have to sort the records, then loop through them setting the number field (1, 2, 3 etc) before finally displaying your layout. Something like this. I'm calling the number field (1 , 2 , 3 etc) myTable::index Sort Records [on the sub-summary field] Go To Record/Request/Page [First] Set Field [ myTable::index ; 1] If ( Get ( FoundCount ) > 1 Set Variable [ $index ; 2 ] Set Variable [$currentGroup , myTable::GroupName] Go To Record/Request/Page [Next] Loop If [ myTable::GroupName = $currentGroup ] Set Field [ myTable::index ; $index ] Set Variable [ $index ; $index + 1 ] else Set Variable [$currentGroup , myTable::GroupName] Set Field [ myTable::index ; 1] Set Variable [ $index ; 2 ] End If Go To Record/Request/Page [Next ; Exit after last] End Loop else // there was only one record in the found set so do nothing end if Edited October 6, 20178 yr by rwoods
October 6, 20178 yr 6 hours ago, chadski021 said: How to show the record number in a sub-summary layout? It should start at record 1 per group, Use a summary field defined as Count of [any field that cannot be empty], Running count, Restart summary for each sorted group. 1 hour ago, rwoods said: You may have to sort the records, then loop through them setting the number field That would create a conflict when two users want to produce different reports.
October 6, 20178 yr Ah yes, comment got the right answer, mine was both long winded and not safe for multi-users!
Create an account or sign in to comment