Hi
I've been trying to use ReportWriter and a template to create a proposal document. After sometime I have given up and started to use the Generator code directly.
Basically I have a DB with a number of feature requests and need to pull these in to the proposal, filling out page after page with feature request.
A feature request consists of a few labels and a main text area (that might contain wiki markup - need to translate this to Table2 mostly).
Thing is a can't find a suitable container to add the page elements too that lends itself to flow layout - i.e each feature request can have a variable height and this is causing issues when I add them to the page, and try to overflow.
Tried AreaGroup and AnchorGroup - AnchorGroup seems the closest but putting multiples on the same page doesn't seen to stack them.
Has anyone got any thoughts?
Cheers
Dave
Cheers
Dave
AnchorArea
Re: AnchorArea
Support · Aug 9, 2010Hello Dave,
If you want to add page elements one after the other you can do this by tracking the current Y position and update it after adding a new item. You can track this by using the Height of the element you are adding and some padding after the element. All the page elements has the Height property. Table has GetRequiredHeight method which will give the required height for the data and you can compare with the available height on the page and then you can set the height to the table. You can add the overflow to the next page without any problem.
Thanks,
ceTe Software Support Team.
Re: AnchorArea
Forum member · Aug 9, 2010Hi
The problem with tracking the current Y position is that if I run out of space on one page the Y position for the objects on the next page are wrong if I've already placed them. i.e. if I put a TextArea in a table near the bottom of the page, when this gets relocated to the next page the TextArea X,Y are still at the bottom.
This causes very strange rendering. I've started to use Table2 as the root element which is working allowing me to workout overflow as you suggest.
However, I then hit the same problem when I have to put a table within this root table - i.e. when I detect a table in the Wiki markup content I have.
Is it possible to place a table within a parent table's cells?
Is there any way I can make element placement relative to the table position?
Cheers
Dave
Re: AnchorArea
Support · Aug 10, 2010Hello Dave,
Tracking the Y position would solve your problem. When getting the overflow you can have a different X, Y than the initial values. The GetOverflowTextArea method will take the X, Y as parameters which will be the new location for the overflow text.
For the overflow table also you can have different X, Y positions. You can also use the X, Y properties to set the X, Y.
You can add any page element including Table to the cell of a table without any problem. The element's X, Y position will be considered with respect to the cell of the table when adding to the cell. You can refer to the Adding Page Elements to Cells
topic on our help documentation.
Thanks,
ceTe Software Support Team.