Problem to calculate formula
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7

Thread: Problem to calculate formula

  1. #1
    Join Date
    Aug 2013
    Posts
    6

    Question Problem to calculate formula

    Hello

    Good afternoon.

    I'm having problems with formulas in crystal'm new to the program, I have to create a formula that has to sum ​​the values​​.

    I created a formula to sum​​.
    1
    1
    3
    1
    1
    1
    2
    3
    1
    2

    total = 16

    more is not the correct value for the report is that the sum certain.

    1
    1
    3
    1
    1
    1
    2
    3
    1
    2

    total = 10
    it not only sums the values ​​that two or more.

    version of Crystal Reports XI

  2. #2
    Join Date
    Jul 2005
    Posts
    1,076

    Re: Problem to calculate formula

    It seems to me that you are using "Count" instead of "Sum"
    Are you using RunningTotal field or a Formula field?
    If it is a formula then post the code and say in which section you placed it
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  3. #3
    Join Date
    Aug 2013
    Posts
    6

    Re: Problem to calculate formula

    Quote Originally Posted by jggtz View Post
    It seems to me that you are using "Count" instead of "Sum"
    Are you using RunningTotal field or a Formula field?
    If it is a formula then post the code and say in which section you placed it

    Hello

    good day
    I'm using a field forluma, section I put in Group footer # 3.

    I made two formulas to find the value;

    1st
    Numbervar i;
    i: = Sum (AGR_FALTA_ATESTADOS_V.FALTAS {}, {} AGR_FALTA_ATESTADOS_V.CD_FUNC);

    2nd
    numberVar i: = 0;

    if (AGR_FALTA_ATESTADOS_V.FALTAS {})> 0
    then i: = i +1

    The second that I'm using.

  4. #4
    Join Date
    Jul 2005
    Posts
    1,076

    Re: Problem to calculate formula

    In first formula you are storing the Sum of field FALTAS in variable i
    In second formula you are initializing the variable i and then storing the Count of field FALTAS
    It's not clear enough

    What are you trying to achieve?
    Count each time there are FALTAS or SUM the FALTAS?
    JG


    ... If your problem is fixed don't forget to mark your threads as resolved using the Thread Tools menu ...

  5. #5
    Join Date
    Aug 2013
    Posts
    6

    Re: Problem to calculate formula

    is to account for the lack of formula. the amount of foul.

  6. #6
    Join Date
    Aug 2013
    Posts
    6

    Re: Problem to calculate formula

    Quote Originally Posted by Fabiano2016 View Post
    is to account for the lack of formula. the amount of foul.

    is to account for the lack of formula. the amount of foul.

  7. #7
    Join Date
    Aug 2013
    Posts
    6

    Re: Problem to calculate formula

    Quote Originally Posted by Fabiano2016 View Post
    is to account for the lack of formula. the amount of foul.


    Can anyone help me.

Posting Permissions

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


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center