SSRS - Shrink the Ship-to row

This is a custom pro-forma invoice, basically. The ship-to address fields are in a parent group-header of the data. Naturally, many fields are often blank, like Contact or Address2. I set them all to CanShrink. OK so far.

When I do this, the report crunches the address, but not the row (the group header), so all that space I saved just ends up under the column headers (and looks stupid).

Some Googling says click the row and set it to CanShrink also. But the row is filled with a Rectangle, of course, and I can never seem to select the row; it always selects Rectangle2 instead.

Any thoughts? I saw @ckrusen mentioned something about a textbox can’t shrink. Maybe rectangles are the same?

So what do others do? Just put the address outside of the Tablix? Does that help?

After selecting any control in the row, select the row “grip” to the left of the tablix

Also, there was a recent thread on replacing those individual boxes with single textbox that combines them all using line breaks.

Well, Epicor does the “shrink” in the RDD and just passes a string with the blanks removed. It also formats the address based on the entities address-format or the default country format. So you can do it there.

Or…

You could create a report function that formats the string which you assigs to the textbox.

Regarding the “CanShrink” …

Here’s a quick test of a SSRS report with various nested controls and settings.

image

And the result:

Fun Fact:

Those Datamatrix Barcodes were generated with VB code in the Report. No DLL or additions to the server required! Potentially useful for SaaS/MT users.

Stick it in a single field together.

I never use CanShrink. I always make a single textbox with CanGrow. For address fields, I write a longer expression that splits the address by tilde an if there is a value for a line, then show it (think “cascading IIF”).

I think you all said the same basic thing, but I gave Clint “the solution” for brevity. I do appreciate everyone’s more elaborate responses, too.

I was hoping there was something easy I was missing, but all signs pointed to the same thing. Basically, it seems that the standard ways of making a report, with Rectangles in the Tablix cells, is the very thing that gets in the way of shrinking the rows.

As @Jason_Woods implied, I think the basic SSRS design principle is: Always start with the small element that can grow; never hope that a larger element can shrink. Because it won’t.

Thank you all.

Looks like this discussion.

1 Like