SSRS - Export SSRS Report To Excel and Name Sheets to Group Values Automatically

Scenario : 


We have created a SSRS report on which we have Country Name on Each of Page. We want to export this report to Excel but want to create separate Sheet for Each Country Name.

Our report look like this


Solution : 

Lets start to make changes in our report so when we export to Excel , it dump the data to separate sheets and sheets should have the Country Name.

Step 1:  
Under the Row Group, Right Click on group and then go to Group Properties


Go to Page Breaks and make sure "Between each instance of a group" is checked.


Step 2:
Right Click on group as shown below and press F4(properties) , then go to PageName property and click on expressions.

Write expressions as shown below


Step 3: 
Lets export our report to Excel and see if everything worked as expected


Final Output :

As we can see that the report is exported to required format we wanted to do.




1 comment: