100% found this document useful (4 votes)
2K views

Smartforms To Get Subtotals On Each Page

This document provides steps to add subtotals to each page of a smartform. Step 1 is to use the calculation tab on a table line to select an operation like sum, average, or count. Step 2 is to select the field to subtotal and enter a variable for the target field. Step 3 is to set the time for the operation, usually after the loop. Step 4 allows initializing or resetting the target field before or during the loop.

Uploaded by

Kabil Rocky
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
2K views

Smartforms To Get Subtotals On Each Page

This document provides steps to add subtotals to each page of a smartform. Step 1 is to use the calculation tab on a table line to select an operation like sum, average, or count. Step 2 is to select the field to subtotal and enter a variable for the target field. Step 3 is to set the time for the operation, usually after the loop. Step 4 allows initializing or resetting the target field before or during the loop.

Uploaded by

Kabil Rocky
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

To get subtotals on each page in smartforms

This page will be helpful to all those people working with smartforms who haven't yet dealt with sub totals. STEP1 If the requirement is to get subtotal on each page, we can use calculation tab of smartforms which is present on table line as shown in the figure below.

As shown, three types of operations can be done. 1) To get the sum of all values of all line items. 2) To get average or mean value of all line items 3) To get a count of all line items. According to your requirement you can choose the operation.

STEP2 Put the name of the field of the table whose subtotal you want in the column Field Name. Put a variable in the column Target Field Name. This variable will have the value of subtotal which you got to print.

STEP3 Set the time according to your requirement.

As shown in the figure you can set time in four ways. For the operations Total or Average Value use After Loop. It is not possible to use the event Before Loop to display a total of the table items to come, because the calculation event refers to one loop pass only and not to the entire loop.

STEP4

Initialize-Activate this setting if you want the target field name to be reset to the initial value before the loop starts. Reset -The value of the target field name can be reset to the initial value. For field name-If you set the event for the reset to 'Sort Criterion' you must enter the relevant sort criterion here.

You might also like