Solved

# Group and total records by value

Posted on 2006-05-26
Medium Priority
189 Views
I am new to crystal reports and am trying to figure out how to make this work. I need a report that selects all money accounts (positive, negative and 0) value. I want to put all the positive accounts first & total them. Then the negative accounts & total them and exclude any account with 0 values. Finally total them all. I have crystal reports 10 and it is all in a single table.

Example:

Acct 1      123456      \$10.00
Acct 2      789123      \$22.00
Acct 3      456789      \$12.00
Acct 4      012345      \$30.00
______________________
\$74.00
________________________
Acct 5      987654      -\$2.00
Acct 6      765443      -\$3.00
________________________
-\$5.00
===================
\$69.00

Thank you
0
Question by:carlmahon
• 2

LVL 101

Accepted Solution

mlmcc earned 1000 total points
ID: 16773559
The easiest way is to create a formula

Name - MyGrouping
Formula
If ({MoneyField} > 0) then
"1Pos"
Else If ({MoneyField} < 0) then
"2Neg"
Else
"Zero"

Insert a group on that formula

Add a select formula - Select Expert

{MoneyField} <> 0

mlmcc
0

LVL 4

Author Comment

ID: 16776201
Thanks that worked perfectly.
0

LVL 101

Expert Comment

ID: 16777475

mlmcc
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…
###### Suggested Courses
Course of the Month14 days, 17 hours left to enroll