Jump to content

Vertically align an image or text in a band


Recommended Posts

Cuurently i feel there is no way to vertically align image or text in a band. I have a detail band with dynamic records. I have to place an image on this band such that depending on the no of records the image appears vertically centered.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic



The records need to be displayed using a subreport or a list component that runs side by side with the image, inside the same band.

Then, make the image stretchType="RelativeToTallestObject", vAlign="Middle" and scaleImage="RetainShape".

This way the image area will grow as big as the subreport or list component besides it, but depending on the scaling (RetainShape or Clip) it will not be deformed, but rather aligned at the Middle of this stretched area.


Check the /demo/samples/subreport or /demo/samples/listcomponent samples provided with the JR project package.


I hope this helps.


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...