?
Solved

Have SSRS rows size shrink if a column is hidden

Posted on 2014-03-12
5
Medium Priority
?
1,682 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Suggested Courses

801 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