Solved

Have SSRS rows size shrink if a column is hidden

Posted on 2014-03-12
5
1,632 Views
Last Modified: 2016-11-12
I have a report which has an optional column to display a picture. This requires a taller row height to display the photo.  We are adding a parameter HidePhoto  to set the visibility of the relevant column to false.  The problem is even with the column hidden the row size is unchanged.  Is there a way to do this or do we need to reports?
0
Comment
Question by:canuckconsulting
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 16

Accepted Solution

by:
DcpKing earned 500 total points
ID: 39925343
If there's a way for code in your ssrs page to tell/be told that there is/is not a picture then you should be able to change the height. Set the CanGrow to True for the row, and set the rowheight to an expression referencing a field that tells the code what height to make the row.

hth

Mike
0
 
LVL 27

Expert Comment

by:planocz
ID: 39932850
You do not have to have another parameter of HidePhoto.
All you need to do is check for data coming in.
sample:
=IIF (Trim(Fields!Photo.value) = "", " ", Fields!Photo.value))
0
 

Author Comment

by:canuckconsulting
ID: 39953419
Sorry for delay...just getting back to this now!

DcpKing...this sounds perfect but I don't see where I can set an expression for row height.  Can you point me in the right direction?

planocz:...I want to allow the user to choose whether or not to display photos on the report.  Some users want a more condensed report without the images.
0
 

Author Closing Comment

by:canuckconsulting
ID: 40102512
Perfect...highlighted the row, selected properties and set Lineheight to an expression
0
 

Expert Comment

by:Jike claude
ID: 41884633
canuckconsulting, please can you show me the expression you used for the LineHeight? I have a similar situation. Please help
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Viewers will learn how the fundamental information of how to create a table.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question