My data is grouped and may have several hundreds of detail rows but all descriptions are unique and have a SQL key identifier. Prices are calculated for each record but due to constraints of displayed data a client wants a report to look like the attached sample where every group of similar descriptions has a grey break, and I have a way to accomplish that with the Key ID and some yes no fields in the database. What I am having a problem with is the highlighted yellow area.
I need the text to change on each successive row for 4 records and reset, even across page breaks as it shows highlighted. I can create 4 text fields, one under another on the row and display or hide them but I am unsure of the best way to approach this. I thought I could count records after each grey line and display or hide my "PART" text box by the record count, or trigger the count by counting from previous row descriptions where it is the same for the new one but I am unsure of what to do at a page breaks, or simply count from the grey bar (this is a similar record with a unique ID but a flag that I hide all text except the description and change the background of the section to grey.
My goal is to have the first record below the grey bar displays "PART 1" in a text box, 2nd record displays "PART 2" text box and hides first text record box and so on for 4 records then reset the counter. I read that something similar can be accomplished by a formula field but I am not quite sure how to accomplish this either.
Help is greatly appreciated. I am using CR 2011 fed from SQL server where all the sorting occurs.