Resizing Address Tablix Box

I have modified the purchase order report. I would like to shorten the tablix that holds the information. However I can’t seem to adjust the height. I have an inch of free space. Any ideas anyone?

You can do conditional row visibility in that way if no address is display in the row of the tablix the row won’t be visible and it wont show as a blank space in the report

PS: I will say to place the address in a textbox if it is one address. if you have multiples it will be better to handle it with a subreport than a tablix.

Actually, its part of tablix1 - in 2 rectangles. In the rectangles I have text boxes for the information. However, I cannot shorten the box height - not sure what I a missing. It’s probably simple - just can’t find it :confused:

In SSRS reports, you can’t make a container smaller that the size of the controls in it.

I assume you mean these areas of the PO Form

And sometimes there are hardly visible rows or elements. If You zoom in on the area highligthed above, you’ll see there are two tablix rows above the row that holds the addresses. And in the top one, there are two “hidden” fields (i’ve highlighted them yeallow and magenta)

So zoom in and see if there are any "hidden elements that prevent you from shrinking the conatiner’s size.

We have removed about 4 of the bottom lines for the address. Moved up phone, fax and email but yet, I still cannot shrink the box. Nothing hidden, very strange but frustrating

There is a very skinny Textbox (Textbox20) in the rectangle on the right. I’d paste a picture, but this site is acting up. In my last post, look by the left hand side of the rectangle on the right and you can see a dotted box that is only a pixel or two wide, but extends the height of the rectangle.

The text box has no expression or field tied to it. I think it is there strictly to keep these boxes from shrinking

Edit

The site seems to be working now.
image

yep, I killed that awhile ago. Anything else you can think of?

Found another one - it was in the box on the left hand side - I shortened it! Thank you!!!

1 Like

SSRS really does need an object explorer like Crystal Reports has. You could just slect different objects and see them get selected in the design area.

But with SSRS, you gotta zoom in, expand and stretch, hover the mouse pointer to see if it changes shape, etc …

2 Likes

Look on the left side there is a vertical thin text box that is what is not letting you shrink the box. I encounter that before sorry i didn’t understood you before

1 Like

So, I have been using tab to move through all the elements (this can help to find very small elements), but I am still struggling on how to Shrink the Address boxes on the POForm. I have shortened the long skinny text boxes and made every text box Can Shrink = True and made the label boxes hidden if the calculated field is null.


I want the address row to shrink up, you can see how high the Phone number moved up.

What else am I missing?

FWIW - the “Can Shrink” property doesn’t really work.

What might work is to have a single field for each address type (BillTo and ShipTo), with an expression that combines all the original fields. Make it just one line high, and set the CanGrow to true.

The address elements are created by a split based on the ~ character of a single field. What I tend to do is use the single field and replace the “~” with “vbcrlf” and allow the box to grow and it only takes up the space it needs (also worth replacing “~~” with “~” first so you do not get blanks lines) and you end up with a short address that also follows any address format rules you have in place for various country codes.

2 Likes

@mark.yates thanks for the tip. So I wanted to share how I ended up shrinking the huge address boxes on my copy of the PO Form. I am certain there are many ways to do this, so if you have a better more efficient way, I would love to hear it.
So the original form has 8 address lines for both the vendor and the ship to (but as @mark.yates and @ckrusen mentioned, this is a single address field separated with multiple ‘~’ that indicate a line break). In report builder, I could not make the Tablix Row that contains all the individual address text boxes any shorter due to all the space the individual text boxes require (even after making those text boxes can shrink, still left a lot of unnecessary white space). So I left the Calc_VendorContact and ShipToConName text boxes alone (other than to allow them to Can Shrink).


The text boxes directly below those mentioned above (Lbl_BillToAddrList and Lbl_ShipToAddrList), I crammed all the text fields into one text box.


I was careful not to hit enter between adding these fields (just pasting one directly after the previous within the same text box), because if you do hit enter, you will still get all the blank lines showing up because you just added carriage returns/line feeds. So I had to insert the carriage return/line feeds into the Value expression of the individual text fields.
This is the formula I used for Lbl_BillToAddrList (no carriage return/line feed on this first one):
=IIF(split(Fields!Calc_BillToAddrList.Value,"~")(0).ToString() = "","", split(Fields!Calc_BillToAddrList.Value,"~")(0).ToString())
For Lbl_BillToAddrList1 (and all the way up to 7) I used the following formula format (containing the vbcrlf carriage return/line feed):
=IIF(split(Fields!Calc_BillToAddrList.Value, "~")(1).ToString = "", "", Microsoft.VisualBasic.Constants.vbcrlf + split(Fields!Calc_BillToAddrList.Value, "~")(1).ToString)

The standard form has some nice functionality on the Ship to side (for multiple ship to address or for drop ship release) and I did not want to lose that functionality (but I did want to lose all that excess white space in the address box).
So the Value expression for Lbl_ShipToAddrList (no carriage return/line feed on this first one):
=iif(Fields!Calc_MultiShiptoAddresses.Value = True Or Fields!Calc_ExistingDropShipReleases.Value = True, "{" & chr(160) + Fields!RptLiteralsLSeeBelow.Value + chr(160) & "}", IIF(split(Fields!Calc_ShipToAddrList.Value, "~")(0).ToString = "", "", split(Fields!Calc_ShipToAddrList.Value, "~")(0).ToString))

For Lbl_ShipToAddrList1 (and all the way up to 7) I used the following formula format (containing the vbcrlf carriage return/line feed):
=iif(Fields!Calc_MultiShiptoAddresses.Value = True Or Fields!Calc_ExistingDropShipReleases.Value = True, "", IIF(split(Fields!Calc_ShipToAddrList.Value, "~")(1).ToString = "", "", Microsoft.VisualBasic.Constants.vbcrlf + split(Fields!Calc_ShipToAddrList.Value, "~")(1).ToString))

This resulted in a more compact address (but capable of growing) with limited white space.
Some oddities I have seen that I do not know how to resolve.
Things print great when the PO is a drop ship (no extra space below the Vendor phone number):
POAddress6
But when it is a standard shipment, it shows an extra line space below the phone number (and I cannot figure out why).
image

1 Like

The expression I use in SSRS is as follows…
image
(This is on Sales Order Acknowledgement but equally applies to the any address fields)
I place this in rectangle that grows as required and also it follows the address format set against the Country so the method works for all addresses styles.
I found that starting with the standard template caused me all sorts of problems with odd white space appearing all over the forms, so have started from a blank page and get much more controllable results

1 Like

Did you check to make sure the name and address info still lines up with the window in the envelope?

:wink:

1 Like

@mark.yates wow, that is more efficient than my way. Do you know how to drop the final ~ so that you do not get a blank line at the end of the address?

@ckrusen thank you for helping me understand why the form is formatted with so much white space.

Fortunately we do not send any documents via physical post, all are sent via email, so aligning up with envelope windows is not a problem!

To strip the last ~ I would find the length of the string before replacing the ~ with VBCRLR subtract 1 and use this value in a LEFT function to return the first section of the string and drop the ~ then do the replace.

@mark.yates, Thank you for the advice. I struggled to get the LENGTH to work properly, so I used InStr to find the “~~”. Perhaps there were too many embedded expressions, so I used the following expression:
=replace(LEFT(Fields!Calc_BillToAddrList.Value,(InStr(Fields!Calc_BillToAddrList.Value,"~~")-1)),"~",vbcrlf)

It seems to work very well.

In order to be helpful, I have shown the more complicated Ship To address formula below:
=iif(Fields!Calc_MultiShiptoAddresses.Value = True Or Fields!Calc_ExistingDropShipReleases.Value = True, "{" & chr(160) + Fields!RptLiteralsLSeeBelow.Value + chr(160) & "}", replace(LEFT(Fields!Calc_ShipToAddrList.Value,(InStr(Fields!Calc_ShipToAddrList.Value,"~~")-1)),"~",vbcrlf))

1 Like