Composite tabItem = new Composite(shell, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
tabItem.setLayout(new GridLayout(1,false));
final ViewerComposite viewer = new ViewerComposite(tabItem, SWT.NONE);
viewer.getReportViewer().setDocument(jasperPrint);
shell.pack();
shell.open();
Rectangle shellBounds = shell.getBounds();
Point dialogSize = shell.getSize();