Results 1 to 6 of 6

Thread: counting!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    counting!!!

    Hey all,

    I'm trying to create a 'summary report' in crystal reports. I have a field called 'Transaction Status' which can have 1 of 4 values: Approved, Declined, Failed, or Unsupported. How would I, for example, count only the total number of approved transactions (rather than counting the total number of transactions). In the report I want to count these values and display them in the form:

    Number of Approved Transactions: xxxx
    Number of Failed Transactions: xxxx
    ...etc.

    I'd like to do this without using a cross-tab. So, is their some sort of formula that could accomplish the same thing for me.

    Thanks

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: counting!!!

    Is the report Grouped in any way? If not you will need to create a "Running Total" Field for each type of 'Transaction Status'.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    Re: counting!!!

    I was trying to use running total initially, but I couldn't figure out how to do it based on each 'transactions status'

  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 2008
    Posts
    15

    Re: counting!!!

    is there anyway i could use the count function.

    whenever i use: count(transactionsStatus, transactionStatus) it returns the value of the first group but not of any of the subsequent groups. For example, if there were 10 approved 5 declined 6 failed, the formula would only return the value 10.

  5. #5
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: counting!!!

    Quote Originally Posted by brucevde
    ...you will need to create a "Running Total" Field for each type of 'Transaction Status'.
    Insert a Running Total Field

  6. #6
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: counting!!!

    whenever i use: count(transactionsStatus, transactionStatus) it returns the value of the first group but not of any of the subsequent groups. For example, if there were 10 approved 5 declined 6 failed, the formula would only return the value 10.
    Where are you printing the formula? It would have to be in the Group Header or Footer to see the count for each group.

    If you want to print the counts in the Report Footer you must use a Running Total.

    On the Edit Running Total screen

    Summary Section
    Field to Summarize -> Choose a unique field
    Type of Summary -> Choose Count

    Evaluate Section
    Set the Use a Formula option.
    The Formula would simply be {TableName.TransactionStatus} = "Approved"

    Reset Section
    Set the Never option

    Again do this for each possible status.

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