FA Depreciation Report - Group Totals by FA Location

Hello!

My goal is to create a report that sums up values Acquisition Cost, Depreciation & Book Value of Fixed Assets by FA Location.

I create the below DataItems and set FA Depreciation Book as a child:

Fixed Asset:

DataItemTableView: SORTING(FA Location Code) ORDER(Ascending)

GroupTotalFields: FA Location Code

FA Depreciation Book:

DataItemTableView**:** SORTING(FA No.,Depreciation Book Code) ORDER(Ascending)

DataItemLink: FA No.=FIELD(No.)

Please correct me if i am wrong but since the values i want to sum up are FlowFileds i cannot use the GroupTotalFields feature.

So i created Global Decimal variables to store the sums and run the addition on OnAfterGetRecord trigger of FA Depreciation Book data item:

gGroupAcqCost += “Acquisition Cost”;
gGroupAccuDepr += Depreciation;
gGroupBookValue += “Book Value”;

Now the addition continues in all Groups resulting the Total of all Fixed Assets by the end of the last FA Location Group. I know i have to CLEAR my variables by the end of each Group.

I tried Fixed Asset OnAfterGetRecord & OnPostDataItem or even Fixed Asset GroupFooter - OnPostSection triggers. No matter what, all my Group totals end up with zero or wrong values.

Any pointers would be greatly appreciated.

Many thanks in advance for your time!

Regards,

CM

Looks like you are using the classic version for reports, did you tried to debug the code of where the values are getting zero or wrong.

I am sure you have used CalcFields in your FA deprecation data item.

Thanks again Manish for the reply.

We only have classic version in our enviroment if i understood correctly. I haven’t used any other version.

I am trying to debug code but takes time. I will keep trying.

I have cleared all my CalcFields.

Problem Solved!

Hey that’s great.

How did you managed to solve the problem.

I CLEAR my variables on GroupHeader - OnPreSection. Thanks!