views:

886

answers:

2

I am using the ReportViewer control to render some local reports. These reports have some elements that are links to supreports. Some of these elements contain a lot of data ( to be passed as arguments to subreport). The problem is when i export the report to excel, it wont open in excel because of the cell max character limit. I am wondering if its possible to disable/remove certain columns from this report when exporting to excel. I have tried to use the DeviceInfo setting and trying to disable formulas but that did not help much.

many thanks

+1  A: 

I asked a similar question a while ago: Reporting Services 2008: Is there a way to change item properties, depending on how a report is being rendered?

(I wanted to disable some items when a report was rendered as a Word document).

Unfortunately there is no really simple answer, but if you're willing to spend some time on it some custom code should do the trick. (See Gerrie Schenck's answer to my post)

Sophia
+1  A: 

well i was using the winforms version of it, and there 2 possible solutions to this, one is to write your own renderer ( which was a overkill for this), and the other was to tweak the report definition

I loaded the report definition in an XmlDocument and removed all Action nodes from it, this would take out all the links, and then re ran the report with the new definition in the background and render it to excel. Although it takes a little more, it does the job.