alternating background color

  • I've used the IIF/Switch statement before in doing alternating background colors, but this time is a bit different because the sequence values are not consistent. What i need is to alternate the colors for each change in the sequence field base on the sorting order. For example...

    descr sequence

    home 100

    home 100

    home 220

    work 110

    work 110

    work 110

    work 500

    So in this case, home 100 would be color 1, home 220 would be color 2, work 110 would be color 1, work 500 color 2.

  • You might try to group the records by the decr and sequence and then do a MOD 2 to change the colors of the rows that way?

    Or perhaps you could create another column in your dataset that increments by 1 for each change and then use a mod 2 of that... basically the same concept just a bit more behind the scenes.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • I cant group it because the user needs to see all the details of each row (i didnt list all the columns). How do I increment for each change?

  • nm, i figured it out. i thought you needed a group in the table for the below script to work but apparently not.....

    =iif(RunningValue(Fields!descr.Value & Fields!sequence.Value,CountDistinct,Nothing) Mod 2, "lightBlue", "White")

  • Glad you got it worked out.

    -Luke.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

  • Hi, is250sp.

    As I know, RAQ Report[/url] can set background color for report easily, users only need to do some settings in report properties.

    RAQ Report: Web-based Excel-like Java reporting tool[/url]

  • becklery, perhaps it would be wise for you to stop trolling on this site or maybe pay Steve for the free advertising you are getting.

    To help us help you read this[/url]For better help with performance problems please read this[/url]

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply