VishalMistry
8th April 2010, 06:56
Hi all tools geeks,
We have a customized purchase order report. I have a after.field layout which i want to print always at the bottom of the page (currently it is printing immediately after the detail layout).
Our device and page size configuration is as below:
Paper type : A4 font (small) length 66 lines
report length : 66 lines
there are two after layouts. first one with 20 lines & second one with 6 lines. Both, i want to print always at the bottom of the page.
Pl guide.
Thanks in advance,
Vishal Mistry
saumya
8th April 2010, 07:19
u can calculate no of rows. then use skip(expr) before printing after layout field.
manish_patel
8th April 2010, 12:12
Just idea on paper. You can try it...
first one with 20 lines
after.<field name>.<layout_number>:
before.layout:
if lattr.lineno<41 then
skip(41-lattr.lineno)
endif
before.<field name>.<layout_number>:
before.layout:
if lattr.lineno=61 then
skip(5)
endif
second one with 6 lines (I am assuming that this field has higher sorting priority)
after.<field name>.<layout_number>:
before.layout:
if lattr.lineno<61 then
skip(61-lattr.lineno)
endif
Hitesh Shah
8th April 2010, 19:17
Hi all tools geeks,
We have a customized purchase order report. I have a after.field layout which i want to print always at the bottom of the page (currently it is printing immediately after the detail layout).
Do u want to print the same at bottom of page or bottom of report . Bottom of page can be accomplished in footer . As the bottom of page can be only one and sort breaks can be 0 to any , u need to specify how to relate this.
VishalMistry
26th April 2010, 11:24
Hi Hiteshji,
I can't use footer as the user will not fire PO printing one at a time as he will give range of purchase orders to be printed. Still i will give it a try.
Thanks a lot,
Vishal
VishalMistry
26th April 2010, 11:27
Just idea on paper. You can try it...
first one with 20 lines
after.<field name>.<layout_number>:
before.layout:
if lattr.lineno<41 then
skip(41-lattr.lineno)
endif
before.<field name>.<layout_number>:
before.layout:
if lattr.lineno=61 then
skip(5)
endif
second one with 6 lines (I am assuming that this field has higher sorting priority)
after.<field name>.<layout_number>:
before.layout:
if lattr.lineno<61 then
skip(61-lattr.lineno)
endif
Hi Manish,
I have already tried your suggestion, but one strange thing is happening. While printing the lattr.lineno in the layout, system prints 22 and if I use message function in the same layout to print the value of the variable, it prints some other value (44). If you can help me to trace this, it would be helpful for me.
Regards,
Vishal
croezen
26th April 2010, 12:08
if you have an after.layout of 9 lines use :
skip.to(spool.pg.length - 9)
VishalMistry
26th April 2010, 12:30
if you have an after.layout of 9 lines use :
skip.to(spool.pg.length - 9)
Hi,
I tried as per your advice, still, the same issue. the after layout is printing where the detail layout ends.
Regards,
Vishal
croezen
26th April 2010, 15:11
after.orco.20:
before.layout:
r.head.control()
skip.to(spool.pg.length - 9)
don't know what the r.head.control does, but try to add it if you please.
Hitesh Shah
26th April 2010, 17:46
Alternatively , u may declare a boolean in report script , set it true in after.field / before.layout section and set lattr.print to false in the same section . And keep the print condition of footer section as to the new declared boolean varable = true . After printing the footer (after.layout subsection ) set it to false again . Also have the before.field for same sort field to start on new page always (which will trigger all paging mechanisms including printing of footer) . If u dont need before.field set lattr.print to false in before.layout of before.field
Alternatively u can try also lattr.break or some variable to indicate sort break in footer section.