Link to home
Start Free TrialLog in
Avatar of Jess31
Jess31

asked on

MS ReportViewer ?

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?
Avatar of sureshbabukrish
sureshbabukrish
Flag of India image

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

Avatar of Jess31
Jess31

ASKER

Where would I put the expression?
ASKER CERTIFIED SOLUTION
Avatar of 13598
13598
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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
Avatar of Howard Cantrell
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)=""