Hide columns from printed report


I would like to exclude a column from the output when the report is printed, but have the column remain visible on the web page view. Any ideas on how this can be done?

Thanks in advance.

more ▼

asked Feb 21, 2012 at 06:56 PM in Default

avatar image

905 60 64 68

(comments are locked)
10|1200 characters needed characters left

3 answers: sort voted first

But it is definitely possible in 2008 R2 though. :) Globals!RenderFormat.Name can be used against Hidden property expression. Sadly, the OP is using ssrs 2008.

more ▼

answered Feb 22, 2012 at 02:20 PM

avatar image

Usman Butt
14.9k 6 13 21

Yeh.. definitelly you are right @Usman Butt.. Checked and the IMAGE renderer is used while printing and print layout preview and RPL for interactive preview.

Feb 22, 2012 at 08:30 PM Pavel Pawlowski

@Usman, you should convert your comment to answer or post it as answer, as it is solution to this problem. So it can be voted and also accepted as answer to this question.

Feb 22, 2012 at 08:36 PM Pavel Pawlowski

@Pavel Pawlowski I have turned it into an answer for the generic search. But I do not think it can be an accepted in this case. The OP is using SSRS 2008 not SSRS 2008 R2.

Feb 23, 2012 at 05:59 AM Usman Butt

@Usman right... I was a little blind When checking this.. 2008R2 allow this and earlier versions not..

Feb 23, 2012 at 06:16 AM Pavel Pawlowski

It happens to all. Me too missed the tags often.

Feb 23, 2012 at 06:32 AM Usman Butt
(comments are locked)
10|1200 characters needed characters left

Don't know about any automatic way, but you can can mae a clicable element in the report which will show or hide the column when clicked. Then prior printing you can hide the column.

Other possibility could be have one report for displaying with the column visible and second with column hidden. (this can be easily done by single report - introducing a hidden parameter which will specify whether column is showed or hidden and then create a Linked Report with different parameter setting from default - eg. default value wihll show the column, overriden value from linked report will hide the column).

more ▼

answered Feb 22, 2012 at 07:07 AM

avatar image

Pavel Pawlowski
22.7k 10 15 26

As @Usman Butt commented on @Jonathan Allen answer. It is possible on SSRS 2008 R2 as for Printing an IMAGE renderer is used and for interactive preview RPL renderer is used.

Feb 22, 2012 at 08:34 PM Pavel Pawlowski
(comments are locked)
10|1200 characters needed characters left

Pretty certain there is no way to do this via Reports Manager, if you are accessing the reports via a custom application then you could do it programmatically via code behind the Print button.

I'm actually not 100% sure that Pavel's solution will work, something makes me think that when you print all areas are expanded.

more ▼

answered Feb 22, 2012 at 02:11 PM

avatar image

Fatherjack ♦♦
43.8k 79 102 118

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Feb 21, 2012 at 06:56 PM

Seen: 2234 times

Last Updated: Feb 23, 2012 at 06:33 AM

Copyright 2018 Redgate Software. Privacy Policy