Solved

MS ReportViewer ?

Posted on 2010-08-16
5
401 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
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

707 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now