cancel
Showing results for 
Search instead for 
Did you mean: 

sub totals not displaying in the output

Bharath84
Participant
0 Kudos

Hi All,

I am trying to display the sub-totals for LTAP-NSOLA field in each page of the form output.

I have created a dynamic table. Add later added two rows Subtotals and GrandTotal and changed the properties to Footer only.

However I tried using the below links and it is not clear.

Calculating Page-wise Sub-Totals and Grand Total in Adobe forms

Below is my form.

 

I have copied the java script for sub totals and Grand totals but it is not working.

Am I missing anything. Please coorect me.

Thanks,

Haritha

Accepted Solutions (0)

Answers (1)

Answers (1)

Bharath84
Participant
0 Kudos

Hi All,

Can anyone help me to achieve the subtotals in adobeforms.

Thanks,

HT

prajeshdesai
Contributor
0 Kudos

I'm using below script, and it is working for me,


var oFields = xfa.layout.pageContent(xfa.layout.page(this), "field", 0);

var nNodesLength = oFields.length;

var nSum = 0;

for (var nNodeCount = 0; nNodeCount < nNodesLength; nNodeCount++) {

    if(oFields.item(nNodeCount).name == "NSOLA") {

    nSum += parseFloat(oFields.item(nNodeCount).rawValue);

    }

}

this.rawValue = nSum;

Be sure that you set field as calculated - read only.

Hope this helps.