Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Gross total in adobe form

arindam_samanta
Participant
0 Kudos

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 1Field 2Field 3
AAA10
BBB25
CCC30
Total65

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.

5 REPLIES 5

harshal_d
Explorer
0 Kudos

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

0 Kudos

Can u please tell me what is data, row1, tab, group?

Former Member
0 Kudos

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 writeSum(Amount[*]).

         

               where Amount is the name of the field which you want to calculate the total.

If helpful Reward with Points.

Regards,

Surya.

Former Member
0 Kudos

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.

arindam_samanta
Participant
0 Kudos

Thanks to every one!!!