Search code examples
xmlreporting-servicesexport-to-excelreportingservices-2005rdl

How to have an SSRS (.rdl) report generate multiple subreports that can be exported as an Excel file with multiple tabs?


A user wants an existing report, which exports an Excel spreadsheet, to be able to create multiple co-equal divisions/sections/subreports to the report in such a way that, when exported to Excel, the Excel file will put each section on a separate tab.

I'm thinking that may be impossible, but just in case it is: how?


Solution

  • IF my understanding is correct, you can achieve the result by using expression

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

    Basic steps:

    • Firstly modify the report itself, and put sections, divisions, etc. into separate group containers, such as rectangle or list.
    • Put page breaks in front of these containers
    • Then for each group container, input expression above to control its visibility.

    Because when displaying the report in report viewer, the render format is RPL. So when user is viewing the report through server or .net report viewer, those group containers will be hidden. But when exporting to excel, those group containers will be generated.