Custom Reports

All you report experts, this should be an easy one. I have a report with a field that may or may not contain a value (ie. a comment) The spacing remains on the report whether it contains a value or not.

What is the easiest way to shrink the space if comment.value =""
I tried using something similar to the change order but was not successful.

You need to give us more to work with. Report editor? Screen shot of problem area? Fields you are working with? Couple of answers come to mind such as “concat those strings” or “minimize field height but set for autogrowth”, but they are all situation dependent.

Set an expression in the field’s Hidden property

=iif(Fields!ShipDtl_LineDesc.Value == "", TRUE, FALSE)

Remember that the property is called “Hidden”, so a TRUe means, “Yes, hide it”, while false means, “No, don’t hide it”

It’s a report that has a comment field. I am working in SRSS. There may or may not be a comment. Currently the field is in the report but creates whitespace if the field has no value. This can extend a report that has 10 lines and only one comment.

  1. line
    [comment empty here]=whitespace
  2. line2
    [comment empty here]=whitespace
  3. line3
    Prepaid shipping
  4. line4
    [comment empty here]=whitespace

Does this help with what I am trying to do?

One thing to not get tripped up on is the “CanShrink” property. This really doesn’t work - per MS’s documentation:

If the textbox for the Comment is in it’s own row, you could suppress that row’s visibility (make it hidden)

If it is in a row with other fields, make that textbox hidden, and make sure the container (the rectangle it is in), and the row is set to CanShrink.

Another option is to reduce the height of the comment textbox, to a single row, and enable it’s CanGrow.

1 Like

Yep, I agree with @ckrusen on his comment regarding

If the comment field is on it’s own row in the tablix, then you can right click on that row and adjust it’s ‘Row Visibility’ based on an expression.