RDLC Row Serial Number based on Condition

I’ve declared a variable SLNO as integer using VScode. In predataitem trigger I’ve assigned SLNO:=0, and Aftergetrecord trigger SLNO+=1. I’ve supposed to skip the serial numbers when a comment comes instead of Items. How could I do the skipping the serial numbers? If I’m assigning “If Type:= Type::Comment then begin SLNO:=0; end;” for this the next serial number starts from “1” but I want to continue SLNO with skipping only.

If I am understanding you correctly, you want to count the number of Serial Numbers.
I would create a variable for SerialNoCounter and increment it.

Then when assigning the SLNO, if the Type is Comment assign 0, otherwise assign it to the SerialNoCounter.

Tonya Bricco-Meske
Microsoft MVP

blogger16x16 twitter16x16 linkedin16x16

photo113x45