mandag den 13. maj 2013

2 Tips when saving your tablix based SSRS reports to Excel

Hereby two tips related to tablix based SSRS reports using parameters saved to Excel.
1) The saved report has to start at column A and row 1.
Two conditions have to be fulfilled her :

  • If you have a report title and/or logo either in the report header or in the body above the tablix then delete them. Dynamically setting the hidden property of a textbox or image does not help.Recall that you only can statically hide the report header, but this does not help either.     
  • In the properties window for your tablix, set the location to 0, 0. ( Left = 0 , Top = 0 ). 
2) After saving the report in Excel, the users must be able to see the parameter values.
To accomplish this, you may create a new table with two rows : the first one with headers containing  your parameter names ( the Prompt: values you entered for each of your parameters for instance).
The second row, an expression that concatenates - for a multivalue parameter - the values selected by the user.
An example, that also distinguishes between the 'All'  and the other values might look like :
= Microsoft.VisualBasic.Interaction.IIF(Parameters!<param1>.Label(0) <> "All", Microsoft.VisualBasic.Strings.Join(Parameters!<param1>.Label, " "), "All")  

 

where you will replace <param1> with your own parameter(s).

You may also add a page break before the tablix, set the DocumentMapLabel and PageName properties in order to customize the link name in the Document Map and the name of the worksheet allocated to the parameters.