SQL Server Reporting Services – Textbox Location Changing

I recently ran into a problem in a report I was developing.  The report was a Sales Invoice, and if there were enough line items to move the Totals section to a second page, the tablix which contained the totals moved from the right side of the report, where I had set the location, to the middle.  Eventually I learned that SSRS attempts to maintain relative spacing between report items, so that if an item to the left of another item changes in size, or is hidden, the item to its right is moved.

I had a number of items in my report that had an expression for the Hidden property: ( =iif(Fields!InvoiceType.Value = 2, false, true).  I fixed my report by changing the Hidden property for all items to False.  Then, to achieve the same effect as hiding, I worked with the Color property: (=iif(Fields!InvoiceType.Value = 2, “Black”,”White”).  Changing the font color to white makes it invisible and my Totals tablix stayed where I wanted it, on the right side of the report.

 

Leave a comment