Results 1 to 4 of 4

Thread: Summing two fields in the details section (RESOLVED)

  1. #1

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Resolved Summing two fields in the details section (RESOLVED)

    Hello everybody

    I have a Crystal Reports report. In the details there are two numeric fields. Now, I would like Crystal Reports to create a calculated field, once again in the details section, that would be the sum of these two numeric fields. Can this be done?
    Last edited by divined; Jun 15th, 2005 at 02:54 AM.
    SteadFast!

  2. #2
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Summing two fields in the details section

    yes. just create a new formula and make it fielda + fieldb

  3. #3

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Re: Summing two fields in the details section

    I see. But how do I create a new formula under the RDC?

    EDIT : What I meant is that I can a new formula field named TotalSum, but I don`t know how to express field1 + field2 in the formula editor.
    Last edited by divined; Jun 15th, 2005 at 01:03 AM.
    SteadFast!

  4. #4

    Thread Starter
    Hyperactive Member divined's Avatar
    Join Date
    Aug 2004
    Location
    Thessaloniki, Greece
    Posts
    447

    Re: Summing two fields in the details section

    This is getting into a monologue. I finally used the code shown below in th formula editor.

    Code:
    If Not (IsNull({@UnboundCurrency2})) Then
      {mhxanhma.Kostos_Agoras} + {@UnboundCurrency2}
    Else
      {mhxanhma.Kostos_Agoras}
    The If statement checks for nulls. Otherwise if I just use

    Code:
    {mhxanhma.Kostos_Agoras} + {@UnboundCurrency2}
    I get no value when UnboundCurrency2 is null.

    thx, for the help
    SteadFast!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width