on 10-10-2007 2:31 AM
Hi All,
I am a newer of smartform. Now I face a problem, I want to do total sum at the bottom of main table without showed at each page. But I tried many method and it is not ok.
Plz help me.
I got all the result of sum. My problem is how to display the result at the end of the main window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi yang,
Read the count (v_tot_ent) mean total number of entries in Internal table of main window.
declare a variable (count) and increment it within the loop mean for each item it increments.
place a condition on footer of ur table
count = v_tot_ent
then only the footer will be displayed and in that ur total text element.
Hi,
I used the method as u mentioned. But i faced a problem.
for example,
I have 3 items to be print in the table and one page only can have 2 item.
the output is quite strange.
count is calculations of loop use the operation number.
v_tot_ent is the number of of entries in Internal table .
<b>fist page</b>
item no. qty count v_tot_ent
1111 1 1 3
2222 1 2 3
sum 3
<b>second page</b>
item no. qty count v_tot_ent
3333 1 3 3
Hi,
in main window there is 3 sub windows like herder main & fotter
in that fotter window pass the filed which u r declear the sum for ex: &itab-netwr&
drag & drop the particuler palce then whenver page break is trigger the total will displayed on the that page it self next page again it will calculat add the previous total lastely displyed ground total of all iteam.
in fotter window u place like this
total : &t_itab-netwar&
t_tab-netwr is decleard in the global data of type netwr
t_tab-netwr type netwr.
in the table there one tab called calcultion in that u pass this files give the option after the loop.
this will help u...
thanks...
Hi,
In the node where u r printing the value , u will be printing each value in the textelement. so Before that text elelment u create a program line.
u take a variable and assign the variable as zero .
in the program lines u put the code as
variable = variable + (text-value).
ex:-itab-menge.( uwant to make sum of menge).
var type menge. = 0.(This u do in global def.).
in the program lines.
var = var + itab-menge.
after the loop.
var will be sum of the all .
Assign points if useful.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use calculations tab in table for calculations and then use text element footer to display the total.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
After your main window create a final window. copy paste the table from main window to final window. do al the necessary calculation and place the field in the footer section of the table.
hope ur problem is solved.
regards,
shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In your total text field click check box only after end of main window.
or create a template put the condition as only at end of main window
Regards
Shiva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do it like this...
Inside the loop,use program lines. Declare input variable as field name to be summed, declare output variable which contains the summation value.
now for displaying the total after all line items or tale lines,
Do a doubleclick on table node you will see the tabs goto EVENTS tab.
Choose EVENTS and set the flag of FOOTER checkbox.
Now a FOOTER node is opened into the TABLE NODE (at the end of the table) and so you can insert a text for the total and value that is calculated in program lines.
Close the thread once your question is answered.
Regards,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
11 | |
10 | |
9 | |
8 | |
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.