SSRS - Export to Excel Queries
I have below queries regarding Export to Excel functionality in SSRS 2008:
All queries are regarding Exported Excel from SSRS Report
1. Can sheet names be customized? in other words, do we have control on Sheet names?
2. Can Filters applied in exported excel through SSRS?
3. Dynamic tables are supported in SSRS? if yes, can I export each table as sheet in excel?
4. Can dynamic colors applied to SSRS generated report cell? If yes, in exported excel, will they appear as it is?
5. Is drill down supported in exported excel file?
6. Can add dynamic graphs?
7. Formatting like Font name, size, borders can be applied?
February 26th, 2011 5:47am
Hi Hemat,
I have got some answers to respond.
1. Can sheet names be customized? in other words, do we have control on Sheet names?
Customize sheet names means what way to want to do, whether the sheet names should be different instead of sheet1,sheet2... this can't be done in SSRS 2008, however there is an work around to give sheet names which can be done using XSLT
(http://spacefold.com/lisa/post/2007/10/03/Changing-the-Sheet-names-in-SQL-Server-RS-Excel-QnD-XSLT.aspx and
http://excelsheets.codeplex.com/releases/view/40625).
In SSRS 2008 R2 you can give sheet name instead of XSLT(http://blogs.msdn.com/b/robertbruckner/archive/2010/05/16/report-design-naming-excel-worksheets.aspx)
2. Can Filters applied in exported excel through SSRS? I presume no you can't apply filters
3. Dynamic tables are supported in SSRS? if yes, can I export each table as sheet in excel? You can use PageBreak
after on each table, which will export each different sheet in excel.
4. Can dynamic colors applied to SSRS generated report cell? If yes, in exported excel, will they appear as it is?
Refer:
http://sql-bi-dev.blogspot.com/2010/12/adding-custom-color-in-ssrs-chart.html
http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SQL-Server-2005/Q_22785808.html
http://msdn.microsoft.com/en-us/library/ms155798.aspx
5. Is drill down supported in exported excel file?
6. Can add dynamic graphs?
7. Formatting like Font name, size, borders can be applied? Yes, you can use Expression for formatting like font name,Size & border
Public Function ReportFont(ByVal sSectionFont as String) As String
Select Case sSectionFont
Case "ReportTitle"
Return "Arial"
Case Else
Return "Calibri"
End Select
End Function
Public Function ReportFontSize(ByVal sSectionFontSize as String) As String
Select Case sSectionFontSize
Case "ReportTitle"
Return "12pt"
Case "TableHeading"
Return "10pt"
Case Else
Return "9pt"
End Select
End Function
=Code.ReportFont("ReportTitle")
=Code.ReportFontSize("RowTitle")
Nanda
Free Windows Admin Tool Kit Click here and download it now
February 26th, 2011 6:21am