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

Select All types if one of the types is... 1

Status
Not open for further replies.

TXP007

Programmer
Aug 29, 2008
11
0
0
US
I am running CRXI against SQL server tables.

I have 2 tables joined on Cust_num.

Customer (table)
Cust_number
Cust_name

Classification (table)
Cust_number
Class_descr
Class_amt

Customer (table with data)
1 Bob Jones
2 Rob Tillman
3 John Phillips
4 Bill Fargus
5 Jim Sellers

Classification (table with data)
1 Admin Fee $10
1 Attorney Fee $50
2 Admin Fee $10
2 Doctor Fee $20
3 Admin Fee $10
3 Attorney Fee $50
4 Admin Fee $10
4 Doctor Fee $20
5 Admin Fee $10
5 Attorney Fee $50
6 Admin Fee $10
6 Doctor Fee $20

I want to create a report listing all attorneys with all their associated classifications.

After grouping on Cust_num, my report would look something like this.

Cust_num Cust_name Class_descr Class_amt
1 Bob Jones
Admin Fee $10
Attorney Fee $50
3 John Phillips
Admin Fee $10
Attorney Fee $50

5 Jim Sellers
Admin Fee $10
Attorney Fee $50


How do I build my selection criteria?

Thank you for taking the time to read my post.

TXP007
 
What are you trying to do with the selection criteria? You've explained the tables and the way the report looks, but you haven't said how you're trying to filter the data.

If you're not filtering the data, you can use your current setup, put the Cust_Number and Cust_Name fields in the Cust_Number group header and the Class_Desc and Class_Amt fields in the details section to get the layout you describe.

-Dell

A computer only does what you actually told it to do - not what you thought you told it to do.
 
Group the report by {Cust_num}as you have described above with no record selection criteria

create the following formula
// class flag
if {class_descr} = "Attorney Fee" then 1 else 0

in your report - selection formula - Group add this

maximimum({@class flag},{Cust_num}) = 1

_____________________________________
Crystal Reports XI Developer Version
Intersystems Cache 5.X ODBC connection

 
hilfy,

My filter is on Attorny fees.

If a customer has Attorny fees
print ALL classifications for that customer.

Sorry if this wasn't clear in my original post.

TXP007
 
CoSpringGuy,

That appears to be working.

Thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top