Skip to Content

AdobeForms: subtotal per page w/o script

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ć

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Posted on Feb 05, 2019 at 08:01 PM

    Just sum it up in your position table.

    Next you count the items you get on a page and put a if_else condition into your table (could be a seperate line) and print it.

    Do it always that way, because I can debug my values and manipulate it afterwards without changing the form itself:-)

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 06, 2019 at 09:22 AM

    Another solution is, that you sum it up in your table for each line. It's the same as in the first suggestion.

    And assign the field dynamic in your form. But that lead to, that you need to script something inside. So are you allowed to script basic stuff inside?

    If not the only way I see is, that you count the lines before, what end in a bigger effort, because you need to featch all the data before and the form itself + Interface do nothing or even do the job a second time.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.