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

Grouping In Crystal Reports 1

Status
Not open for further replies.

report2000

Technical User
Mar 1, 2005
45
US
Hi,
Here is how my report looks like:

Description: Number of Employee:
'1-300 Employees' 5
'301-500 Employees' 2
'501-800 Employees' 10
'801-1500 Employees' 1
'Over 1500 Employees 5

Now:
I wrote the following function in Crytal Reports in order to group my data:
-----------------------------------------
If {Facilities.Total FTE EEs} < 301 then
'1-300 Employees'
else
If {Facilities.Total FTE EEs} > 300 and
{Facilities.Total FTE EEs} < 501 then
'301-500 Employees'
else
If {Facilities.Total FTE EEs} > 500 and
{Facilities.Total FTE EEs} < 801 then
'501-800 Employees'
else
If {Facilities.Total FTE EEs} > 800 and
{Facilities.Total FTE EEs} < 1501 then
'801-1500 Employees'
else
If {Facilities.Total FTE EEs} > 1500 then
'Over 1500 Employees
--------------------------------------------
I inserted this function in a group footer called JobID. ( I want to have a page break everytime the JobID chages.
If one of the conditions that I used in my function does not return a value that part does not appear in my report. (Let assume I do not have any data that falls witin 501 and 800). My report shows the rest except the 501-800 category. I would like to show the category and set Facilities.Total FTE EEs = "0"
If I write different functions for each one and put them in group footer called JobID the first job category returns a value and the rest return "0".
Please help
 
You could use running totals, one for each category, where you use a count of {table.EmployeeID}, evaluate using a formula:

{Facilities.Total FTE EEs} < 301 //for {#1-300empl}

Reset on change of group (Job ID).

Change the evaluation formula for each running total to reflect the category range. Then place the running totals in the job ID group footer, along with text boxes to identify them.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top