Sum a non-field column in crystal reports v10

How would I sum the non-field columns in my crystal reports. Error message is
"A field is required here."
By the way the column figures on my crystal reports which I wanted to sum up are results of formulas using visual basic syntax.
Thanks a lot.

Example:
How can I obtain sum of the following basic syntax code:
 
shared cAmountSched as currency
shared cAmountSchedBranch as  currency
cAmountSchedBranch = cAmountSchedBranch + cAmountSched
formula = cAmountSched - {ZZ_LAPO_Arrear.arrearamt}

Open in new window

LoloyDinorogAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

peter57rCommented:
shared cAmountSched as currency
shared cAmountSchedBranch as  currency
Dim Tot as currency
cAmountSchedBranch = cAmountSchedBranch + cAmountSched
Tot= Tot+cAmountSched - {ZZ_LAPO_Arrear.arrearamt}
formula = cAmountSched - {ZZ_LAPO_Arrear.arrearamt}


Then create a new formula field to display Tot
0
LoloyDinorogAuthor Commented:
peter57r:

Thanks. But the figures that would display on my new formula field named Tot is
the last entry or line of the column being summed. Hope you can further analyze
the problem.
0
peter57rCommented:
Sorry...the variable declaration should be:
Global Tot as currency
0
Become a Microsoft Certified Solutions Expert

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

LoloyDinorogAuthor Commented:
peter57r
Kindly review my formulas peter57r, where did I go wrong? And
if you can give me your suggested 'scripting' then I will appreciate
it very much.
1. I created a column named IntBalArrears which worked so fine by:

    shared cAmountSched as currency
    shared cAmountSchedBranch as  currency
    cAmountSchedBranch = cAmountSchedBranch + cAmountSched
    formula = cAmountSched - {ZZ_LAPO_Arrear.arrearamt}

2.Then I made a column total or sum by using your suggestions which
   unfortunately did not work:

  shared cAmountSched as currency
  shared cAmountSchedBranch as  currency
  Global Tot as currency
  cAmountSchedBranch = cAmountSchedBranch + cAmountSched
  Tot= Tot+cAmountSched - {ZZ_LAPO_Arrear.arrearamt}
  formula = cAmountSched - {ZZ_LAPO_Arrear.arrearamt}

  Thank you and more power.
0
LoloyDinorogAuthor Commented:
peter57r:
For further info,  I placed formula 1 above within Group Footer #2 section of the report,
and formula 2 within Group Footer #1.
I do not know if it has bearing to the results or outcome of the computations.
Thanks.
0
peter57rCommented:
The change I made was to MODIFY your original formula field,  NOT to create a new one. You don't need both formula fields

To display Tot all you do is create a formula field which is...

Whileprintingrecords
Global Tot as currency
formula= Tot
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
LoloyDinorogAuthor Commented:
peter57r:
Thankssssssssssssssssssssssssssssssssssssssss!!!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.