Velocity reports: How to do Fixed or Absolute positioning?

Questions and answers on designing your Servoy solutions, database modelling and other 'how do I do this' that don't fit in any of the other categories

Velocity reports: How to do Fixed or Absolute positioning?

Postby roddy » Tue Oct 12, 2021 5:21 am

When using "position: fixed" or "position: absolute" in a template used by Velocity; it throws an exception:
Code: Select all
ERROR com.servoy.j2db.util.Debug - org.xhtmlrenderer.render.AnonymousBlockBox incompatible with org.xhtmlrenderer.newtable.TableCellBox


We need to be able to ensure the positioning of a rendered field; in this case it is to ensure the position of the address for a standard window envelope. The data above this position can be of varying size; how can we fix a position of a field using a Velocity template?
roddy
 
Posts: 65
Joined: Mon Oct 26, 2020 12:32 am

Re: Velocity reports: How to do Fixed or Absolute positionin

Postby roddy » Tue Oct 12, 2021 5:37 am

If anyone else comes across this; I created the content above in a div that uses a fixed height.
roddy
 
Posts: 65
Joined: Mon Oct 26, 2020 12:32 am

Re: Velocity reports: How to do Fixed or Absolute positionin

Postby ptalbot » Tue Oct 12, 2021 5:47 pm

Yes setting absolute width/height of divs is the way to go, or using tables with specific row heights and cell widths.
I had a similar issue for a client who needed to print barcodes on sticker paper, they needed to be positioned very precisely.
With a little bit of trial/error, I managed to build a table grid that placed all the barcode as needed.
Patrick Talbot
Freelance - Open Source - Servoy Valued Professional
https://www.servoyforge.net
Velocity rules! If you don't use it, you don't know what you're missing!
User avatar
ptalbot
 
Posts: 1631
Joined: Wed Mar 11, 2009 5:13 am
Location: Montreal, QC


Return to Programming with Servoy

Who is online

Users browsing this forum: No registered users and 10 guests

cron