Jump to content
We've recently updated our Privacy Statement, available here ×

How to set Hori/Vertical align in program ?  


Recommended Posts

By: msprasanth - msprasanth

How to set Hori/Vertical align in program ? Â

2006-01-11 14:11

Hello, Â

Â

I am trying to take the alignment from user and manipulate report at run-time using the Java API provided. Â

Â

jasperReport = JasperCompileManager.compileReport(jasperDesign); Â

JRBand detailBand = jasperReport.getDetail(); Â

Â

JRBaseElement element = (JRBaseElement) detailBand.getElementByKey("name"); Â

JRBaseStyle alignment = (JRBaseStyle) element.getStyle(); Â

Â

and alignment is NULL... because when i try to do a element.setX(50) its not throwing and exception but, when i try to do a alignment.setHorizontalAlignment(JRAlignment.HORIZONTAL_ALIGN_LEFT)... it throws a NULLPOINTEREXCEPTION !! Â

Â

Any clue ?? Â

Â

Thank you. Â

Link to comment
Share on other sites

  • 9 months later...
  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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