09-16-2020 6:17 PM - edited 02-03-2024 6:53 PM
Hi everyone, hope you are having good and safe days..
Regarding to my question,I have browsed community questions and answers and tried some of the relative ones but still couldn't manage to do it
I need to write subtotal of one column from a table for each page... if in the first page appears 8 rows it should show column's sum of 8 rows, as if it has 14 rows in a second page need to show sum of 14 rows and etc...
Row numbers are not always the same for the page, need to take this also into consideration.
What I am able to do right now is enabled footer to be shown in every page, enabled (Repeat footer on each subsequent page), used FormCalc and got sum of the column, but in this case my footer variable which holds 'Total in sheet :' is writing same data(sum for all rows) into every page.
I am hoping you may help me for this case, your response is highly appreciated. Thank you!
Adding this code into Javascript, worked!
var fields = xfa.layout.pageContent(xfa.layout.page(this)-1, "field", 0);
var total = 0;
for (var i=0; i <= fields.length-1; i++) {
if (fields.item(i).name == "NETWR") {
total = total + fields.item(i).rawValue;
}
}
this.rawValue = total;
We may close this post!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.