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!

Counting Records From Database

Status
Not open for further replies.

faisalsham

Programmer
Mar 11, 2005
18
0
0
US
hello,

I need to come up with the following report but have a difficult time. Here are the Columns and a sample data set:

Work Unit Open WO Closed WO
--------- --------- ---------
Electrical 5 2
Carpentary 3 5
Sign Shop 10 4
.
.
.

as you can see the grouping needs to be done on the Work Unit, but then I need to sum up the Open and Closed Work Orders for each Work Unit. Can you please help me on how can I sum up the Open and Closed Work Orders for each unit?

So for example Electrical... I need to be able to count the number of Open Work Orders in the database and display the 5 and count the number of closed Work Orders and display the 2 according to the example above.

thanks for your help.
 
Write a formula for open work orders:

If {WOStatus}="open" then 1 else 0.

Write a nearly identical formula for closed work orders. Place both formulas in the detail section, and insert group summaries and grand totals for both formulas. Hide the detail section.

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
dgillz,

thanks for your help! It seems to be doing what I want to do.. now I have put the date factor in...
 
Dates are usually best handled by grouping on the date.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top