views:

428

answers:

1

So i have an rldc, and a subreport which is just the same data grouped into region summaries.

on the main report the classic alternate row coloring stuff works fine... it even has groups, with page breaks between groups and the rowcolor stuff is fine.

but on the subreport with the group the colors seem to be semi random.

Does anyone know how to get the alternate row coloring to work right on a grouped subreport?

for the record here is the way I implemented the alterante row color. on the background color i set teh folowing expression.

=iif(RowNumber(Nothing) Mod 2, "Gainsboro", "White")

Don't know if it's relavent but I'm runnign VS2008.

Thanks,

Eric-

A: 

Try this: =iif(RunningValue(Expression Being Grouped On, CountDistinct, nothing) Mod 2, "Gainsboro", "White")

For Example: =iif(RunningValue(Fields!ClientNoFromFileName.Value, CountDistinct, nothing) Mod 2, "WhiteSmoke", "White")

In my summary report I was grouping on ClientNoFromFileName field.

I can't take the credit for this though, I got this from Benjamin Lotter's post here: http://social.msdn.microsoft.com/forums/en-US/vsreportcontrols/thread/fa4fdeec-1fb5-49d7-8c4f-7dbab939b731/

J Cooper