2015 May 12 11:36 AM
Hi Experts,
This is one Adobe Form requirement and need some idea. My requirement is to display a table with three fields. Table values are coming from driver program. Table is dynamic. At the end, one extra line will be added for the total of third column. It is looking like below -
Field 1 | Field 2 | Field 3 |
A | AA | 10 |
B | BB | 25 |
C | CC | 30 |
Total | 65 |
For total, do I need to send it from my driver program or I need to use some script like JAVASCRIPT?
Or is there any other best way?
Kindly suggest.
Thanks In Advanced!!!!
Warm Regards,
Arindam Samanta.
2015 May 12 1:04 PM
Hi Arindam,
You can use script as shown below to calculate total
SUM(Data.Tab1.Group1.Row1[*].VALUE[*])
From the drop down list 'SHOW' you have to select 'Calculate' and in 'Language' drop down you have to select 'Formcalc'.
There is a document in SAP technical that you can refer :
Calculating Page-wise Sub-Totals and Grand Total in Adobe forms
Regards,
Harshal
2022 Sep 01 7:06 AM
2015 May 12 1:59 PM
Hi,
For Subtotals:
Which field you want to calculate the subtotal, take the name of that field and then
Select the subtotals numeric and then
a) Select "Calculate" event in the Show drop down list
b) Select "FormCalc" in the Language drop down list
c) Run at: "Client"
Just write Sum(Amount[*]).
where Amount is the name of the field which you want to calculate the total or else you are interest in Scripting you can write above code also.
For grand totals:
Which field you want to calculate the grand total, take the name of that field and then
Select the Grand totals numeric and then Go to the Object palette -> Under Value tab -> Select the type as Calculated - Read Only -> Under this Select radio button Calculation script
a) Select "Calculate" event in the Show drop down list
b) Select "FormCalc" in the Language drop down list
c) Run at: "Client"
Just write | Sum(Amount[*]). |
where Amount is the name of the field which you want to calculate the total.
If helpful Reward with Points.
Regards,
Surya.
2015 May 12 2:12 PM
Hi Arindam,
Easy way to get it done is pass the value from driver program.
And in Form layout insert one table(body) row and bind the last column to the above value.
in the second column you can use text as 'Total'.
Thanks,
Omprakash.
2015 May 14 10:22 AM