Skip to Content
0
Former Member
Nov 03, 2009 at 08:49 PM

Alternating Color Subreport details

17 Views

I've created a subreport with detail lines that can be suppressed if the value of my database field is zero. So on some reports I could have 7 lines.. and some I could have three (for example) depending on the data. I have to make this table an alternating color table. So if the first line has a white background, the next line needs to have a silver background.. if the line before a line has a silver background.. that line needs to have a while background.

Example of report with 5 detail lines showing:

White

Silver

White

Silver

White

Example with 8 detail lines showing:

White

Silver

White

Silver

White

Silver

White

Silver

There are only 10 detail lines available and the first one is always white. I've been trying to write a formula in the background color properties in my section expert for each detail line that would do this for me.. I was going for something like:

If previous value is crWhite then

formula = crSilver

else

formula = crWhite

end if

I know this is wrong because I can't find a function that will do it for me. Does anyone know a simple way to do this?

Thanks!