The_Pat
2nd May 2002, 20:58
Hi there,
I'm looking to have a dynamic report layout so that it will repeat itself based on how many different types of currency totals there are in the report. What I planned to do was load an array and then based on how many records were in my array, the report layout would be printed x number of times. How can I output the entire array contents ?
evesely
2nd May 2002, 21:19
You can cycle through each item in the array by using layout.again() in the after.report section of your report script. See if either of these two threads help:
Example 1 (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1075)
Example 2 (http://www.baanboard.com/baanboard/showthread.php?s=&threadid=1093)
vishbaan
8th May 2002, 15:51
hi,
- say you want to print the totals by currencies:
- have a dummy layout, control printing of the entire layout from report script as follows:
-load an array for the currencies that are to appear in report; and an array for its total.
note:
===========================
spool.pr.line is a system variable that has line information to be printed.
spool.line() is a system function to print spool.pr.line
increment the line number using lattr.line.no system variable
handle page length using need() function
========================
Sample code:
========================
after.dum.layout.1:
after.layout:
for i = 1 to 10
var.line = tab$(22) & chr$(134) & string.set$(chr$(136),30)&chr$(138)& var.curr(1,i) & string.set$(chr$(136),14)&chr$(138)& str$(var.curr.total(i)) & string.set$(chr$(136),24)&chr$(138)& string.set$(chr$(136),24)&chr$(133)
spool.pr.line = var.line
spool.line()
lattr.lineno = lattr.lineno + 1
next i
========================
good time
VISH