Solved

MS ReportViewer ?

Posted on 2010-08-16
5
411 Views
Last Modified: 2013-11-27
In a vb.net app, I'm using MS ReportViewer localy to run reports. I design the reports in visual studio using it's template for RDLC.
The report prints tablular data, but each data row prints ove two lines.
The second line is used to print a comment, the rest fits on the first line.
How can I have it not print the second line where the comment field is empty?
0
Comment
Question by:Jess31
[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 9

Expert Comment

by:sureshbabukrish
ID: 33452137
use expression in the visibility property for the second line
i hope both the lines are in detail
so you check if any data is there, then make visible true or else false

0
 

Author Comment

by:Jess31
ID: 33454413
Where would I put the expression?
0
 
LVL 16

Accepted Solution

by:
13598 earned 500 total points
ID: 33454599

Select the second row, righ-click and choose Properties (make sure you select the row and not just the field).
In the properties tab expand the Visibility property, click by the Hidden property and select Expression. When the expression window opens enter your expression, for example:
=Fields!Comment.Value=""  
Instead of Comment you need to select your comment field.
0
 
LVL 9

Expert Comment

by:sureshbabukrish
ID: 33455460
when you open the Expression, by default the value would be 'False", replace it
with below value
=IIf(fields!Colval = "",true,false)

if Colval is blank use the above expression, if not, then convert the null value to blank value and use this expression
0
 
LVL 27

Expert Comment

by:planocz
ID: 33460898
To make it simple you can  just put this in the expression
Visiblitity - Hide Box on the row you want to hide
=Trim(Fields!Comments.Value)=""
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

726 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