April 26th, 2012, 09:39 PM
Create Row Numbering and Page by group in Data Report
I have an data report(vb6) where I have grouped by Journal_No, Address and Description. I will like to create row number and page by the grouping.
In group header, I am using Current Page Number and Total Number of Pages. For now, if I have selected 5 Journal_No which prints 1 report each. It shows page 1 of 5 instead of 1 of 1 for each Journal_No.
And also for row number, for example if Journal_No 1 have 3 row of results in it. and Journal_No 2 have 3 row of results in it. How to make it print 1,2,3 for Journal_No 1 and restart the numbering as 1,2,3 for Journal_No 2?
As of now, I'm using select row_number() at the query which prints the row as 1,2,3,4,5 and 6, which is completely wrong.
I couldn't use function in detail and also group header.
Help is much appreciated. Thanks in advance.