cancel
Showing results for 
Search instead for 
Did you mean: 

Initialize values in events of SMARTFORMS

Former Member
0 Kudos

Hi all,

I am using Event on Sort End for my table in SMARTFORM. This table contains Vendors with different materials and their materialwise ratings. For each vendor I have to show the avg. score of all materials. So, this score field and counter fields should be initialized after processing each vendor . How to initialize those values? Please help. I have found a structure 'avg' in include RSTXLCCALC. this structure has two fields counter and sum.These two fields are not initialized after calculating avg. of a vendor.Bec'z of that I am getting wrong scores from 2nd vendor onwards.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

Try this way,

1- Delcare a loop under the Event SortEnd and based on the vendor.

2- Now use the calculation tab of this loop and print the mean values.

Former Member
0 Kudos

Hi,

Under the Main table you can use the Calculation Tab for doing average and sum of any field, just you need to declare variable and define at what time you want the totals.

Please close if solved.

Former Member
0 Kudos

I have used :

Operation : Mean

Fieldname : WA_FINAL-VENPER

Target fieldname : VENSCORE

Event : After loop.

Initialization : Active

If I use the Event After sort, it's showing the score of 1st vendor as 0 and showing some value for the 2nd vendor if I run the report for 2 vendors.

Please suggest whether it's correct or not