Table Overflow row height

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for COM/ActiveX (v3)  /  Re: Table Overflow row height

DynamicPDF Generator for COM/ActiveX (v3) Forum

 Jan 18 2006 8:12 AM
I have a problem when adding table rows from a recordset, i'm getting the overflow rows and adding them which is fine until the row contains more text than will fill a page, is is possible to determine when this will happen and add another page to accomodate the row?
 Jan 18 2006 8:26 AM
Posted by a ceTe Software moderator
The table will always show one cell even if that cell is heigher than the height of the table.

To get around this, instead of adding the text directly to the cell, add a text area containing the text with the height of the table. You can then check if the text area has an overflow and if so, add the overflow text area to the next cell. If it does not, then increment the recordset and add the next record.

Thanks,

ceTe Software Support Team

 Jan 18 2006 8:28 AM
thanks for the reply, could you point me in the direction of how to add a tex area to a cell?

Regards
 Jan 18 2006 8:40 AM
what would you suggest for setting the height of the textarea?

sometimes it will be 1/4 of a page sometimes more.

Regards
 Jan 18 2006 8:44 AM
Posted by a ceTe Software moderator
Sure, take a look at the SetTextArea Method of the cell:
  SetTextArea Method

This page contains a description of the method as well as a code snippet.

Thanks,

ceTe Software Support Team
 Jan 18 2006 8:48 AM
thanks for the reply,

what about positioning the textarea and setting the hieight and width dynamically?
 Jan 18 2006 8:53 AM
also, is it possible to actually add an overflowtextarea to directly to a cell?
 Jan 18 2006 8:54 AM
Posted by a ceTe Software moderator
This will work best if the height is set to the height of the table minus the cell padding (top and bottom).

Thanks,

ceTe Software Support Team
 Jan 18 2006 8:58 AM
Posted by a ceTe Software moderator
The overflow text area can be added to the next cell using the cell's SetOverflowTextArea method:
    SetOverflowTextArea Method

There is no problem with positioning the textarea or setting its hieght and width dynamically. The positioning will be from the top left corner (after the padding) of the cell.

Thanks,

ceTe Software Support Team
 Jan 18 2006 8:59 AM
thanks for the reply,

i can't see anything in your help about adding an overflowtextarea to directly to a cell though?
 Jan 18 2006 9:07 AM
It's not ideal to be honest, some of the cells would normally only be 2 lines, but if i set the textarea to the height of the table they will take up the whole page
 Jan 18 2006 9:20 AM
Posted by a ceTe Software moderator
Sorry I missed that. You should set the height of the text area to the value of the text area's GetRequiredHeight method. If this is greater than the height of the table, set it to the table height.

Thanks,

ceTe Software Support Team
 Jan 18 2006 9:43 AM
Thanks for the reply again,

at what point can i use getrequiredheight if i am setting a text area like this:

Dim MyCellTextArea
    Set MyCellTextArea = TextCell.SetTextArea( textHeight & " - " & field2, 0, 0, 400, <need dynamic height here>)
 Jan 18 2006 9:55 AM
Posted by a ceTe Software moderator
Something like this would work:
Dim MyCellTextArea
Set MyCellTextArea = TextCell.SetTextArea( textHeight & " - " & field2, 0, 0, 400, MyTableHeight)
If MyCellTextArea.GetRequiredHeight() < MyTableHeight Then
    MyCellTextArea.Height = MyCellTextArea.GetRequiredHeight()
End If

Thanks,

ceTe Software Support Team
 Jan 18 2006 10:53 AM
Thanks for your help, got it working quite weel.

Regards

All times are US Eastern Standard time. The time now is 6:17 AM.