none
Format rows depending on toggle item possible? RRS feed

  • Question

  • Hi everyone,

    I have several reports which contain a lot of sums. Right now, it is a bit hard for the user to see at first glance which sum belongs to which element. Therefore I want to format the sum row.

    Here you can see a part of one of my reports:

    If "Accepted" is collapsed, font weight for "Total" in the "Level" column should be normal. If the toggle item is collapsed, font weight should be bold.

    Here is my report in VS:

    Is there any way to realize this kind of conditional formatting?

    Best regards
    pgosch

    Wednesday, October 16, 2019 7:54 AM

Answers

  • Hi Pgosch,

    If your SSRS is 2008 or 2012 version, you could try to take a look at the proposed post in this thread:How do I evaluate the toggle state of a textbox within an expression?

     

    If your SSRS is newer than 2014, there would one work around for this scenario:

    1. You could insert one more extra row, that has exactly same content as the "Total".

    2. Set one of the two Total to be bold, and toggled on the "accepted", initially run as "Shown"

        the other one, oppositewise,  Set  to be normal, and toggled on the "accepted", initially run as "Hidden"

    You could see the test result which I made:

    Hope this helps.

    Regards,

    Lukas


    MSDN Community Support Please remember to click Mark as Answer; the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by pgosch Thursday, October 17, 2019 4:53 AM
    Thursday, October 17, 2019 2:30 AM

All replies

  • Hi Pgosch,

    If your SSRS is 2008 or 2012 version, you could try to take a look at the proposed post in this thread:How do I evaluate the toggle state of a textbox within an expression?

     

    If your SSRS is newer than 2014, there would one work around for this scenario:

    1. You could insert one more extra row, that has exactly same content as the "Total".

    2. Set one of the two Total to be bold, and toggled on the "accepted", initially run as "Shown"

        the other one, oppositewise,  Set  to be normal, and toggled on the "accepted", initially run as "Hidden"

    You could see the test result which I made:

    Hope this helps.

    Regards,

    Lukas


    MSDN Community Support Please remember to click Mark as Answer; the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by pgosch Thursday, October 17, 2019 4:53 AM
    Thursday, October 17, 2019 2:30 AM
  • Hi Lukas,

    thanks for your answer, it works pretty good. There is only one problem with this solution. If I use the report "online" in the browser, everything is fine. But if I export the report to Excel, the "total row" is shown twice (one row with font weight bold and one is normal). Is there any way to avoid this behavior?

    Best regards
    pgosch

    Thursday, October 17, 2019 4:56 AM
  • Hi Pgosch,

    Since our control of excel exportation is still using visibility property, it is kind conflict with this little trick above. I've tested some ways, but unfortunately not work perfectly.

    One way would be that , we could make copy of two tablix.

    One for web portal, this is the one we made above. Set the visibility for the whole table: 

    =IIF(Globals!RenderFormat.Name = "EXCELOPENXML",true,false)

    Another copy of the table, used only for the export of Excel, and this table should have only one "total" line. And set its visibility:

    =IIF(Globals!RenderFormat.Name = "EXCELOPENXML",false,true)

    You could get the ideal from the first trick we have already made for the table.

    This is kind ugly, but should work for you.

    If I find anything better, I would come back to you.

    Regards,

    Lukas


    MSDN Community Support Please remember to click Mark as Answer; the responses that resolved your issue, and to click Unmark as Answer if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, October 17, 2019 10:16 AM
  • Thanks, Lukas. Indeed, this could be a possible solution, but I think I will rather forgo this feature.

    Thursday, October 17, 2019 10:49 AM