BaaNRules
5th January 2011, 15:14
Hi All,

I am editing a standard purchase order report.
according to my requirement: if under purchase order POR000001 there are 8 purchase order lines available, then i want to print 2 purchase order lines (let us consider)in every page under the purchase order POR000001. so 8 purchase order lines will be printed in 4 pages under purchase order POR000001.i did this by using to.page()/skip.to().

but now i want to print after.field layout section in every page. i mean for purchase order POR000001 , there are 4 pages with every page having 2 detail .so i want to print after.field layout for purchase order POR000001 individually in those 4 pages .

---------------
page-1

POR000001

line-1 ---------> (detail section)
line-2

after.field (for line-1 and line-2)

---------------
page-2

POR000001

line-3 ---------> (detail section)
line-4

after.field (for line-3 and line-4)

---------------
page-3

POR000001

line-5 ---------> (detail section)
line-6

after.field (for line-5 and line-6)

---------------
page-4

POR000001

line-7 ---------> (detail section)
line-8

after.field (for line-7 and line-8)

---------------
page-5

POR000002

line-1 ---------> (detail section)
line-2

after.field (for line-1 and line-2)
---------
.
.
.
.
.
anybody if u have solution, please help me.waiting for your response.

with
thanks & regards
BaaNRules

mark_h
5th January 2011, 15:50
Can't you just change it to a footer layout?

BaaNRules
6th January 2011, 05:59
Dear mark_h,

Tnank you for your response.

ya it is impossible.

so already i putted FOOTER layout only, and i copied the script written for that after.field section in report script, for footer layout(my developed) in report script.

but i am not getting data for footer layout, though my footer layout is getting printed in every page.

i am not getting how to get data in footer layout in every page.

Please give me some solution.

with
thanks & regards
BaaNRules

BaaNRules
6th January 2011, 06:09
Dear mark_h,

for more detail after adding footer layout,

---------------
page-1

POR000001

line-1 ---------> (detail section)
line-2

footer layout (for line-1 and line-2)

---------------
page-2

POR000001

line-3 ---------> (detail section)
line-4

footer layout (for line-3 and line-4)

---------------
page-3

POR000001

line-5 ---------> (detail section)
line-6

footer layout (for line-5 and line-6)

---------------
page-4

POR000001

line-7 ---------> (detail section)
line-8

footer layout (for line-7 and line-8)

---------------
page-5

POR000002

line-1 ---------> (detail section)
line-2

footer layout (for line-1 and line-2)
---------
.
.
.
.
.
i am copying ths script of after.field layout in report script to my footer layout. but my footer section is unable to calculate value fro corresponding page's records.

anybody if u have solution, please help me.waiting for your response.

with
thanks & regards,
BaaNRules

amitmmokashi
6th January 2011, 08:06
Hi,

In this case, what you can try out is control the section "after.field" using a boolean variable. Declare the variable in the Report Input Fields with Ascending Sorting.
Initialise the variable for each detail section. After hitting the to.page()/skip.to() functions, you can make that boolean variable as TRUE and in the print expression of the after field, only execute it if the variable value is TRUE. In the "after.layout" section of the "after.field", again initliase the variable to FALSE. This wont get executed since the layout has conditional operation when it is TRUE.
Hope it helps you.

Regards,
Amit Mokashi

mark_h
6th January 2011, 16:50
Actually I was thinking to get the values(like sums) into the footers then you can setup the report script to sum values and then just print it in the footer. So for example if you wanted sums from lines 1 and 2, then 3 and 4 you could something like this.

declaration:
extern domain some.total, some.total1

before. program:
some.total = 0
some.total1 = 0

detail.1:
after.layout:
some.total = some.total + sales
some.total1 = some.total1 + price

footer.1:
after.layout:
some.total = 0
some.total1 = 0


Something like this would do a sum for each detail layout, print totals in the footer and then reset the totals.

BaaNRules
17th January 2011, 06:42
Hi All,


Thank You all for Your suggestions and solutions.

I solved this problem by using Footer Layout in report.

Thanks & Regards,
BaaNRules