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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

This is probably a simple question, 1

Status
Not open for further replies.

leeskers

Programmer
Feb 19, 2003
8
US
This is probably a simple question, but I am new to Crystal and I don't have any good documentation, so here goes.

I have two tables, Incidents and Claims. An incident can have more than one claim, and each incident is grouped by type. Each claim has some monetary value assocaited, but an incident does not always have an associated claim.

What I am trying to do is list out the distinct incident types, and then a count of that incident type and also the number of claims related to that incident type, and the total value associated with the claims. Something like..

Type Number Inc. Number Claims. Total Claim
S/F 5 2 $250
Theft 3 1 $1000
...

I can get the distinct incident types, but my count is not correct, and I am having a bad time getting the number and cost of claims. I can actually put together a few SQL statements to get what I need, but that does not seem to help me. Hopefully someone can help me!

 
Select the incident identifier and use Insert-Summary to do a distinct count for that group. Do the same for the Claim identifier. Then select the amount and use Insert-Summary to add a sum of this field for this group.

If that is what you ARE doing, then explain how your numbers are wrong. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Expert's Guide to Formulas / Guide to Crystal in VB
- tek@kenhamady.com
 
thanks kenhamady,

i definitely need to work with Crystal to get some of the nuances down.

i was placing my summary in the group portion, so i was getting the initial count for the first grouping, and i did not have the reset count on group change selected (that is how i was getting the wrong count). i moved it to the group footer section and changed the reset count on group change property.

just putting a count on the id field for the claims gave me the correct count, and never even occured to me.

again, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top