on 2014 Mar 31 2:02 PM
Hi,
I'm creating an PDF print form for a customer and they have a layout requirement which I cannot figure out how to do.
The problem is that a table should fill the most of the page regardless of the number of lines, but when the document should be paginated, the footer should be moved to the last page. I hoped it would be as simple at the ability to set minimum height on the bodyrow, but this isn't possible.
I hope someone has a great idea how to fix this, as it's beginning to drive me crazy?
Here you can see page 1 and 2 from the customers layout description - if there is no pagination, page 1 should look like page 2.
Regards,
Stefan
I found the solution by scripting it.
The bodyrow content is wrapped in a positioned subform, where I calculate the subform height based on table height, page numbers, and the other elements on the pages.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I already did, but here's some more details.
The bodyrow content is wrapped in a positioned subform, where I calculate the subform height based on table height, page numbers, and the other elements on the pages.
On the initialize event on the wrapper subform I have this javascript:
var layoutheight = "174mm";
var lastpagelayoutheight = "147.79mm";
var pagecount = $layout.pageCount();
if (data.Page1.Linjer.BodyRows.HeightSpacer.Linjetabel.h > lastpagelayoutheight){
data.Page1.Linjer.BodyRows.HeightSpacer.h = ((pagecount - 1) * layoutheight) + lastpagelayoutheight;
}
else{
data.Page1.Linjer.BodyRows.HeightSpacer.h = lastpagelayoutheight;
}
Currently it needs some work done after some more thorough testing with a lot of lines. But you probably get the point.
User | Count |
---|---|
71 | |
10 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.