on 12-25-2006 5:46 AM
I dont see SUM tab in SMARTFORMS. Is there a way for me to fix loop of 20 rows in a page? Need to overflow the rest of the rows into another page. Each page must only have 20 rows. Is there a way for me to total-up the 20 rows of amount in a page? Need to refresh the total sum of 20 rows to be output on that same page layout as it loops to many pages
Inside the loop,use program lines. Declare input variable as field name to be sumed(say wa-xyz),the variable you use for summing(say v1) and cnt(type i) for counting 20 rows. Declare output variable as v1 and cnt.
In coding,
if cnt = 15.
cnt = 0.
v1 = 0.
endif.
v1 = v1 + wa-xyz.
cnt = cnt + 1.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Declare a global variable(say v1 default 0) in global definitions->Global data.
Create a program line inside loop.
Give input and output parameters as v1.
Increment v1 inside the program lines.
Use alternate to check if the counter is 20.
set counter = 0.
Then inside alternate use command to go to new page.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi ,
for this type of cases use table for printing.
in table u have calculations there u can find the sum of the value
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.