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 in selection formula 1

Status
Not open for further replies.
Sep 29, 2003
28
0
0
BY
I have an SQL database with two tables
Organization (OrgID OrgName) and
Sale (OrgID SaleDate). Tables are linked by OrgID. The report i've created in CR 9 shows organization and the number of sales for this organzation. Report has a paramter field {?MinSaleCount} and I want to show organizations having number of sales greater than {?MinSaleCount}. I'm selecting all organizations and then supress those which count of sales is less than {?MinSaleCount}.Is it possible to count the number of sales for each organization in selection formula?
Thanks for help!
 
I'm not sure if I understand but if I do...
If you show OrgID and SaleDate (from the Sales table) in your Details section and then group by OrgID (you can change this to OrgName from the other table if you njeed to). Then create a summary field, count of SaleDate, and put it in the Group header (You can suppress it if you don't want it visible). Now when you go to your selection expert, that summary field should be there to use, and you can compare it to your parameter field.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top