/SSRS-Element-Centering-Tool

Simple program to centre stuff on an SSRS report, based on element and page sizes.

Primary LanguageJava

SSRS-Element-Centering-Tool

Simple program to centre stuff on an SSRS report, based on element and page sizes.

What?

Have you ever wanted to allign something in SSRS report builder, but have the dreaded problem that the alignement options are greyed out?

align

This is for you!

Why?

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 - pos

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.

How?

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;

  1. Get the size of the report page and element

pagesize

elementsize

  1. Enter in the centr app and select correct units (both units don't have to be the same)

appshot

  1. Press calculate and fail to contain your excitement

result

  1. Enter the result and marvle at your now perfectly centered element!

final

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