Category: | Enhancement request |
Priority: | Normal |
Status: | New |
Project: | Severity: | Minor |
Resolution: | Open |
|
Component: | Reproducibility: | N/A |
Assigned to: |
Summary:
Add an attribute to labels, textfields and other objects to allow them to slide left or right until they hit a margin or another object.
Detail:
Jasperreports already has powerful features to allow objects to expand vertically, stretch a band and push against other objects vertically. Adding similar functionality for left/right sliding and stretching would significantly enhance the library.
Example use cases:
If you create a common header for a number of reports, some landscape and some portrait, it is not possible to right align an object. I'd like to be able to place an object (eg. a logo image) at the top right of a landscape width header, and then have it slide left when placed on a narrower portrait page; or conversely have it slide right on wider paper until it hits the margin.
Another example is the commonly asked for "page 3 of 12" text in a footer. Currently this is impossible in JasperReports because the first part of the string "page 3" needs to be in a field evaluated per page and the second part "of 12" in a separate field evaluated per report. The two fields cannot be aligned with respect to each other because the second field cannot automatically slide left depending on the size of the first field.