vinmee
15th June 2011, 12:05
Dear Baan Experts,
Please advice on how to draw a complete table box with dynamic detail layout and fix location after layout. kindly refer to attachment for more detail.

Please advise.

Thank you so much

bdittmar
15th June 2011, 13:57
Dear Baan Experts,
Please advice on how to draw a complete table box with dynamic detail layout and fix location after layout. kindly refer to attachment for more detail.

Please advise.

Thank you so much

Hello,

suppress the layout from the not needed lines.

Regards

vinmee
15th June 2011, 17:24
Dear Baan Experts,
I need that line 14 & 15 due to the bottom portion (after layout) always print at the same location of last page so cannot supress it.

Please help.

Thank you

mark_h
15th June 2011, 17:42
Instead of using skip.to you can try writing code to use spool.pr.line and spool.line() to try printing the graphics characters. Not real code but you can try something like below(you can figure out how to space the line):

x = spool.pg.length - 13
spool.pr.line = "|" + spaces + "|"
for i = lattr.lineno to x
spool.line()
endfor

There is probably even a way to use a layout. Add a layout like after.po.1. Then you could use layout.again() as long as the line number(lattr.lineno) was less than the spool.pg.length -13. Never tried anything like this myself.

vinmee
15th June 2011, 18:39
Dear Baan Experts,
The code is apply in new after.layout not detail layout?

Please advise.

Thank you

mark_h
15th June 2011, 19:44
In my mind it goes in the before.layout of the after.po.2, but you will just have to play with it to determine where it fits.

vinmee
17th June 2011, 12:11
Dear Baan experts,
I been tried on the script but still not successful. I do not know what happen.below is my script and attached my report output.

detail.13:
before.layout:
if (lattr.lineno>spool.pg.length) then
page()
else
layout.again()
endif

after.po.1:
before.layout:
skip.to(spool.pg.length - 14)

Please help

thank you so much

mark_h
17th June 2011, 16:07
Are you using detail.13 as the blank line? Because I would expect the code to look like:

detail.13:
before.layout:
if (lattr.lineno>spool.pg.length) then
page()
else
if lattr.lineno<spool.pg.length-14 then
layout.again()
endif
endif

after.po.1:
before.layout:
|skip.to(spool.pg.length - 14)


I think, and I could be wrong, that as long as you leave that skip.to in there you will have blank lines. You are just going to have to play with the report to get the correct layout to put this into. I still believe the blankline should be in the after.po.1 layout. Then the bottom of the page with totals would be after.po.2. I did noticed things changed from the first post.

MilindV
18th June 2011, 09:17
Hello,

Before using this solution please remove page and skip.to functions from your report scripts.

Solution:
Insert a after.field layout just after your detail layouts.
This layout will have the just the graphic lines for continuation/complete the box.
Put following code in the report-script
after.layout:
if lattr.lineno < spool.pg.length - r.bottom.mrg - <X> then
layout.again()
endif

Where X is : No of lines required to print remaining/following of layouts.

This may not work as it is but u need to do some trial and error sort of.

I have used this several times with out ne issues. Thanks to one of my senior.