Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Grouping on Muliple Columns

Status
Not open for further replies.

joeg23

Programmer
Apr 5, 2006
13
US
Hi,

I have a database with 3 fields that contain the same data. They record up to three errors in a transaction. These errors are of the same group(Major or Minor). They can have multiple types (majorError1...n, minorError1...n)

In my report, I want to group the three columns together and represent one record for each type of error. The format would be:

Error Type Count of Error Type
minorError1 5
minorError2 3
majorError5 8

I have been unable to get the groupings right so far. Any ideas?

Thanks!
Joe
 
Successful posts tend to include the basics:

Crystal version
Database
Example data
Expected output

You might just group by the errortype, and then suppress the details, right click the errortype field in the details and select Insert->Summary->Count and make sure it's set for the group, not a grand total.

-k
 
Thanks for the heads up on format, that was my first post.

I'm using cr xi with an excel database.

Example data:

Major Error 1 Major Error 2 Major Error 3

Error text (8) Error text (2) <Empty String>
<Empty String> <Empty String> <Empty String>
Error text (3) Error text (1) Error text (5)

*Where () is the error code that is in another field/table

So I have multiple error types (i.e. "Incorrect Interest Rate") which have an error code (i.e. "Incorrect Interest Rate" = M8). I want my report to display the total number of occurences of each error type.

So the output would look like this:

Error Type Error Description # of Errors

M1 No Greeting 0
M2 Unprofessional 2
...
M8 Incorrect Interest Rate 6

------------------

I hope that provides better information about my question and thanks again for the heads up.

Joe
 
One other note:

I've been able to group by each column (i.e. Count of Major Error 1), but what I need is:

Major Error 1 + Major Error 2 + Major Error 3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top