PBDR.COM

About   -   Contact   -   Purchase   -   Search   -   What's New

 
 
Autosize Height - Acutal Height
I've been asked this a couple of times so I thought I would put a tip on how I achieved it. In one of the PBDelta reports I have an autosize height row which has a vertical line running down the edges to make a nice square look on the report. This line gets automatically resized depending on the size of the row.

A few people have written to me explaining that when they query the row height attribute of the datawindow they only get back the height of the row as defined in the painter. However if you would like to get the size of the row dynamically resized by the autosize height you need to call a function called rowheight(). This function returns the height of the row after it has been autosized.

In my case for the PBDelta report I just put a call to this function into the Y2 attribute of the vertical line. If you need to access this attribute outside of the datawindow then you can always use a hidden computed field on the row and access the result of that.

One thing to note, I have seen some peculiar behavior with the vertical line technique in that after printing the report all the vertical lines resize to the widest row, but the report actually prints fine.

 

Top of Page

Legal Notice

Ken Howe 2011