Simple program to centre stuff on an SSRS report, based on element and page sizes.
Have you ever wanted to allign something in SSRS report builder, but have the dreaded problem that the alignement options are greyed out?
This is for you!
For whatever reason, centering an element (text box/ picture/matrix ect) in report builder just doesn't work sometimes.
To centrally align elements I have been using the 'Location' variable under the 'Positon' menu -
Using the ground breaking mathematical formula of Centre = (Page size / 2 ) - (Element size / 2 ), any element will now be perfectly centered when you enter the result into the elements X-axis location variable.
Using absolutely groundbreaking JavaFx and the above mentioned formula, simply enter the width of the report page and the width of the element to be centered, choose the correct measurement unit and calculate. Here's a worked example;
- Get the size of the report page and element
- Enter in the centr app and select correct units (both units don't have to be the same)
- Press calculate and fail to contain your excitement
- Enter the result and marvle at your now perfectly centered element!
Note: This is all based on the premise that Report builder measures the 'distance' variable from the far left side of the element. Should this change at any point, burn this repository
//JB 21/03/18