views:

1345

answers:

1

I'm looking to allow the user to export an reporting service report to Excel. The question I have is how do I specify a formula within Reporting Service which is then present as an Excel column calcualtion on the exported file?

Currently all I can seem to export is end results of the Reporting Services report but I have a need for the user to manipulate a column on the Excel output and see dynamic results. Obviously they could continually add the Excel formulas after each export but I'd rather automate the whole process.

Thanks,

Brian.

A: 

Formulas used in ReportViewer are automatically converted when rendering to Excel. You can also OmitFormulas using DeviceInfo if required, during the rendering process.

For more information on how the conversion takes place, check out http://msdn.microsoft.com/en-us/library/aa178946(SQL.80).aspx

Jon
I hadn't realised that an automatic conversion was taking place. My cells are currently being populated using expressions based on the underlying datasource and I hadn't noticed any particular expressions in the exported Excel sheet. Does the expression need to be based on other cells rather than field data in order for the expression to carry through to the export? If so, how do I address the content of another column in Reporting Services rather than addressing the actual data as Fields!XXXXXX ?
There are many functions of Excel that are not supported by the Rendering method. If you need to do some extra manipulation, which cannot be done, then you will need to look into calling the generated Excel file via COM.
Jon