Reportviewer RRS feed

  • Question

  • I'm new to reportviewer so I don't really know where to start to address my requirement.


    I have a standard dataset that's linked to the reportviewer that displays task information and the associate assigned to that task.


    Multiple associates can be assigned to the same tasks.


    On the report the customer wants tasks that are assigned to multiple associates to be displayed with some sort of visual identification...shading, font color or whatever.


    How can I scan the dataset for a similar taskid and then change the row color when there is a match.  The dataset is ordered by taskid so I can actually only check the previous row's taskid for a match.


    I'm assuming I should use the custom code option for this...does anyone have any ideal of how to tackle this requirement.


    Any help will be appreciated.

    Thursday, March 6, 2008 4:08 PM

All replies

  • This is how I would approach it based on your description, although I haven't actually tried, this, but I'm pretty sure it will work.


    First, I'd of course use a table control

    Then I'd add a group to the control.  The group expreesion would be on Task_ID, that way were displaying the task and all accompanied associates together.


    Then, for the Color Property of the Row I'd use the following expression





    What this should do, is count how many associates are in table_Group1, the group you created....and if more then one is present, color will be red, otherwise make it green



    Of course  "FIelds!Associate.Value" and "table_Group1" should be replaced with the actual values

    Thursday, March 6, 2008 6:16 PM