Search code examples
reporting-servicesssrs-2012ssrs-tablix

SSRS Export to xls without Details


My Report shows the data like in the upper part of the picture:

enter image description here

I can Use the toggel buttons to show details (yellow).

Like in the lower part of the picture I want to prevent this by using a parameter. (Not just hide, but prevent from xls export)

My goul would be to have a parameter, that prevents the details from beeing exported to xls. (Not even as closed toggeled details.)
Print Details = No

Or allow details to be exported.
Print Details = Yes

Is it possible to set this up with parameters? Or do I need to create a separate report for that?
I tried the visability options but even when hidden, the details are exported.


Solution

  • You can do this by setting the Group's hidden property to

    =Globals!RenderFormat.Name = "EXCELOPENXML"
    

    This simply prevents the group from being rendered if your are exporting to Excel.

    Note: if using the old Excel format the rederformat name value is just "EXCEL"

    However, this will not work if you have "toggle on report item also set". In this case you would need to set the visibility based on your parameter.