Total a caluclation field.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Steve (stevemutzel_at_suscom.net)
Date: 05/25/04


Date: 25 May 2004 07:41:31 -0700

I'm having a problem trying to generate a running total on a
calculation field. I have one calculation in the detail section.
Then another in the group that is based from the one in the detail
section. I need to summarize the group totals based on which account
number it is.

Detail Code:(prevDecAmt)
If {FS_GLActualBudgetActivity.FiscalYear} = {?FiscalYear} then
    {FS_GLMasterAccount.MasterAccountCurrentBalance}-
    {FS_GLActualBudgetActivity.Period12ActivityAmount}-
    {FS_GLActualBudgetActivity.Period11ActivityAmount}-
    {FS_GLActualBudgetActivity.Period10ActivityAmount}-
    {FS_GLActualBudgetActivity.Period9ActivityAmount}-
    {FS_GLActualBudgetActivity.Period8ActivityAmount}-
    {FS_GLActualBudgetActivity.Period7ActivityAmount}-
    {FS_GLActualBudgetActivity.Period6ActivityAmount}-
    {FS_GLActualBudgetActivity.Period5ActivityAmount}-
    {FS_GLActualBudgetActivity.Period4ActivityAmount}-
    {FS_GLActualBudgetActivity.Period3ActivityAmount}-
    {FS_GLActualBudgetActivity.Period2ActivityAmount}-
    {FS_GLActualBudgetActivity.Period1ActivityAmount} else
        0

Group Code:(TotalPrevDecAmt)
If Sum ({@PrevDecAmt},{FS_GLMasterAccount.MasterAccount}) = 0 then
    If {FS_GLActualBudgetActivity.FiscalYear} = {?FiscalYear} then
        {FS_GLMasterAccount.MasterAccountCurrentBalance}-
        {FS_GLActualBudgetActivity.Period12ActivityAmount}-
        {FS_GLActualBudgetActivity.Period11ActivityAmount}-
        {FS_GLActualBudgetActivity.Period10ActivityAmount}-
        {FS_GLActualBudgetActivity.Period9ActivityAmount}-
        {FS_GLActualBudgetActivity.Period8ActivityAmount}-
        {FS_GLActualBudgetActivity.Period7ActivityAmount}-
        {FS_GLActualBudgetActivity.Period6ActivityAmount}-
        {FS_GLActualBudgetActivity.Period5ActivityAmount}-
        {FS_GLActualBudgetActivity.Period4ActivityAmount}-
        {FS_GLActualBudgetActivity.Period3ActivityAmount}-
        {FS_GLActualBudgetActivity.Period2ActivityAmount}-
        {FS_GLActualBudgetActivity.Period1ActivityAmount} else
        {FS_GLMasterAccount.MasterAccountCurrentBalance} else
            Sum ({@PrevDecAmt},{FS_GLMasterAccount.MasterAccount})

I need the Sum of TotalPrevDecAmt. Problem is that some of the
accounts do not have any activity for the current year but have an
account balance.

Thanks in Advance

Steve



Relevant Pages

  • Re: Populating a field from account login...
    ... > The Account Field is working great - when I login in with each different ... > Now, the Lab Field also changes with each account change - however, Lab Field ... Each lab has it's own login, ... If "Lab Field" is a Calculation field, then it WILL change whenever any ...
    (comp.databases.filemaker)
  • Re: simple report grouping problem
    ... I followed your suggestion about using running sum and it worked very ... In a Profit and Loss report definition table I added another ... person, bank account information, etc. ...
    (microsoft.public.access.reports)
  • Re: OT; Im RICH
    ... account and other identity numbers: ... fall for the "Nigerian Scan" junkmail offers. ... And if you're dumb and greedy enough to send this sum, yes, you guessed ... such vast amounts for nothing. ...
    (alt.support.stop-smoking)
  • Re: Debt Collection Agency Implications
    ... and rely on intimidation to get results! ... >> would cost a lot more than the sum outstanding. ... > to cover an overdraft on a frozen joint account, ... To credit the first payment, ...
    (uk.legal)
  • RE: Deranged Calculation
    ... Table C is the Basis for the report I produce I add the Totals by account ... "KARL DEWEY" wrote: ... SELECT TableA., SumAS SumOfScore1, ... I need to take the Sum of these amounts in table A and B grouped by Account ...
    (microsoft.public.access.queries)