views:

2925

answers:

3

Hi,

I'm using the ReportViewer control to display a Report within a WebForm, i've also implemented the "Export to Excel" feature, by calling the Render method of the Server Report

eg

ReportViewerControl.ServerReport.Render("Excel",etc,etc,etc);

My problem is that the exported report contains Hyperlinks that link to other reports, I wish these to appear in the webform but not appear hence be disabled in the Exported Spreadsheet (generated by the Code above).

Does anyone have a way of achieving this?

Thanks

A: 

A report has no advance knowledge of what form it is going to take when exported. If you need different layouts depending on what format the report exports to, then you need to make separate reports for each of those layouts.

Erick B
Thanks, my current plan is to pass a bool parameter and switch the links off in the report.
danswain
A: 

Just to answer my own question, we ended up passing an extra report parameter in, and having the report remove the links, and then calling the render as normal.

Simple but it worked.

danswain
A: 

But want to exported into Excel from SSRS Designer. In the Report Designer, Data,Design,Preview tabs are there, I generated the reports in Preview mode and from the toolbar there is an option to Export to Excel. As you said to passing an extra report parameter. but how to do in this scenarios?

Thanks!! worked !!