Skip to Content
0
Feb 05, 2019 at 01:10 PM

AdobeForms: subtotal per page w/o script

85 Views Last edit Feb 05, 2019 at 01:13 PM 2 rev

Hi, all,

I have an internal table (T_INVOICES) with amounts (NETWR) and I am showing it in AdobeForm. I have a requirement to display incremental subtotal of amounts at the end of each page.

I found this thread which nicely explains how to do it by use of JavaScript. However, my form must be PDF/A compliant an I am not allowed to use scripting.

I came to an idea to insert a field INCREMENTAL_SUBTOTAL in the table and fill it with values where each value is a total of all previous NETWR values. On ABAP side it is clear - works fine. However, I am facing a problem on how to utilize it in form layout.

I created a table T_INVOICES which I converted to subforms. I created a TRAILER subform inside it (before DATA) and assigned it to a Overflow Trailer attribute of T_INVOICES subform node. Then I tried the following scenarios:

  1. TRAILER with a static Text just for test - works perfectly (prints at the end of page), except that I miss subtotal value.
  2. I added a Text Field bound to $.DATA[*].INCREMENTAL_SUBTOTAL. The result was bad: all the subtotal values were printed before all DATA lines, like there were two separate tables one after another.
  3. I moved the TRAILER inside DATA (still being Overflow Trailer of T_INVOICES). As expected, now there is one TRAILER for each DATA line, instead only at the end of each page. If I remove Repeat Subform for Each Data Item, it has no effect - still the same problem.
  4. Relative binding for the field as $.DATA[-1].INCREMENTAL_SUBTOTAL - empty field

I ran out of ideas. Please share yours!

Thanks in advance!

KR,

Igor Barbarić