SQL Server Performance

Matrix colouring

Discussion in 'SQL Server 2005 Reporting Services' started by consolidata, Oct 11, 2007.

  1. consolidata New Member

    Is it possible to have a green-bar matrix work with collapsing and expanding groups? I have a matrix working with Chris Hay's suggestions ( http://blogs.msdn.com/chrishays/default.aspx ) but with collapsing and expanding nodes they do not work on the higher groupings consistenly - only on the inner grouping.
    Anyone else have this issue?
  2. satya Moderator

  3. dineshasanka Moderator

    you can use IIF or SWITCH
  4. consolidata New Member

    Yes, as explained I have that working already. It all works fine with all groupings expanded...the problem comes when you collapse the nodes of the groups. On the higher level groupings the colouring doesnt work.e.g. this is the colouring for the inner group with a 3 level grouping.
    =iif(RunningValue(Fields!Group1.Value & Fields!Group2.Value & Group3.Value,
    CountDistinct,Nothing) Mod 2, "White","Gainsboro")
    Tha works fine when all groupings visible, but not when collapsing Group1 or Group2 nodes.. Effectively what I think I need to know is how to check if a grouping has been collapsed and set the colouring accordingly...something like:
    IIf (Grouping3 is collapsed, iif(RunningValue(Fields!Group1.Value & Fields!Group2.Value,CountDistinct,Nothing) Mod 2, "White","Gainsboro"),
    iif(RunningValue(Fields!Group1.Value & Fields!Group2.Value & Group3.Value,CountDistinct,Nothing) Mod 2, "White","Gainsboro")
    Trouble is I dont know how to do the IIF (Grouping3 is collapsed) part of the statement.

Share This Page