Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Green Bar Formatting

Hi Everyone,

I'm writting a report and using a "green bar" format but when I sort the records the record numbers are obviously not in sequential order. This then shows my "green bar" formatting in clusters of green and white and not alternating, depending on record number. How do I format at the print state of the record rather than the creation of the report? An example of the code I've used in the past is below.

if RecordNumber mod 2 = 1 then






Former Member
Former Member replied

Hi Thomas,

It should work, becasue even if you change the order, record number will be counted number of records in sequential order. It is not depen on your sort order.

Anywary try this :



numbervar x;


Place the above formula in your detail (where you want to apply Gree Bar Formatting )

Now go in section expart color and apply the condition :

if {@count} mod 2 = 0 then Nocolor

else crsilver



0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question