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

Count of specific records

Status
Not open for further replies.

ghnat

MIS
Apr 8, 2003
28
0
0
CA
Sorry if this is a basic question, but I'm still a bit of a newbie with Crystal Reports 10.

I have a table with multiple invoice records whereby 1 invoice can include one or many different items and each item would be a separate record within the table. I'm in the travel business so an example would be ...
Invoice number 892634 has 4 items associated to it ...

1. Airline ticket
2. Car Rental Booking
3. Hotel Booking
3. Insurance policy

My question is ... how can I get a count of invoices that JUST have an insurance policy on it and nothing else. Is there a function or specific coding that can give me the results I am looking for?

Any help would be greatly appreciated!

Thank You - Gary





 
First group on {table.invoiceno} and then create two formulas like:

//{@notinsur}:
if {table.expense} <> "Insurance policy" then 1

//{@insur}:
if {table.expense} = "Insurance policy" then 1

Then go to report->edit selection formula->GROUP and enter:

sum({@notinsur},{table.invoiceno}) = 0 and
sum({@insur},{table.invoiceno}) > 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top