on 05-28-2007 11:07 PM
Hi!
I have this problem. I'm working on a very big invoice smartform. I need to calculate a subtotal by page of two columns, these columns are within a loop and this loop within a table in Main Window, and each item could have several values in the column I need to sum up, and also each item could take more than one page, in fact, almost every item take several pages, and the subtotal should be shown in each pages, summing the values of each page of the item.
I tried to use the footer at page break, but it sums up the values of the item that begins in the page that it shows, but the value is actually shown in the following page. The page protection does not work because the item could take several pages and it also could make the subtotal to be shown in the last page of the item, and is also incorrect.
I'm starting to believe that what I need to do is impossible, but if anyone has the solution I will be very grateful.
Thanks a lot!!!!
Hi,
create a window to display the sum. in Main window within table set one flag whenever the page triggers and trigger the window to display the sum. and again set the flag.
Regards
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had a very similar problem and solved it by:
As of release 6.10
1. Define Work Area of Interface Table (i.e. WA_T_SUMS LIKE YLIPS (type of LIPS))
2. In Smartforms Table, mark the Table Line type of the Items to NO PAGE to make sure item appears on page relevant to SumTotal.
3. Table DATA Tab (i.e. ILIPS into GLIPS)
4. Table Calculations Tab, Operation: SUM Total, Field Name: GLIPS-NETWR, Target Field Name: WA_T_SUMS-NETWR, Time: After Loop
5. WA_T_SUMS-NETWR printed in FOOTER text.
For previous releases you can use example logic of "GS_4NEXT_ADDITION" in supplied Smartform SF_TOTAL. Be sure mark your Table Item "No Page" as in 2 above.
CROSS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
in the table node in the calculations tab give the field name you want to sum and the variable(declared in global definitions). in the table footer write the variable. clear the variable in the program lines after you display it.
Regards,
Vidya.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I think you know how many lines for each page in main window,declare one variable,this variable counts how many item records in the page.
let me take one example ,
i have one order ,this order contains 15 Items ,each page you can fit max 8 lines and 2 line for footer.
Now count that item records cross that 8 lines,then print sub totals.
Reward Points if it is helpful
Thanks
Seshu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.