views:

1485

answers:

1

Is there a way to make items right aligned, say with the page or with some other item in a report, using reporting services 2008 ? Right now, I'm sort of emulating this behaviour by shifting items to the right manually so that they look right aligned, however, when there's an item with a dynamic width (e.g. a tablix with data ir the horizontal direction), obviously, this approach fails. What is the correct way to do this ?

+1  A: 

Unfortunately their is no horizontal align property available in the RDL spec (there is vertical align and text align), so there is no best way to do it.

You can employ some tricks to get the visual effects closer or perfect (textboxes work perfectly, tablix's are tougher and depend on a number of their settings):
- Place the right edge where you want it and drag the left edge to the maximum size you want to cater for, set the text align property to right, Set CanGrow to false (on a tablix you need to do this on the columns itself, where on textbox it is available directly): What this will do is allow for the text to appear right aligned correctly with growth handled and no export issues.
- Another trick is to place your elements in a rectangle which can help constrain it.

These options will work fine with dynamically generated RDL's, or setting in BIDS or Report Builder, as should all options, as it is the RDL which is the limiting factor not the tool/method which creates it.

Robert MacLean