Friday 13 September 2013

Sum in the footer of Smartforms

Skip to end of metadata
Go to start of metadata
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.
  

No comments:

Post a Comment