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

Group Formula not grouping

Status
Not open for further replies.

Crystalguru

Technical User
Oct 4, 2001
303
US
Crystal v10
Lotus Notes view

I have the following groups in my report:
Country ASC
Category ASC
@Status -Specified order: Open, Reopen, closed, transferred
Report Date - DESC
Case ID


The status formula is:
if isnull({Case.CaseStatus_t}) then
"Open"
if isnull({Case.CloseDate_d}) then
"Open"
else if isnull({Case.CloseDate_d})and {Case.CaseStatus_t} = "Open" then
"Open"
else if {Case.CloseDate_d} > {?Select End Time } then
"Open"
else if {Case.CaseStatus_t} = "Closed"
then
"Closed"
else if isnull({Case.CloseDate_d})and{Case.CaseStatus_t} = "Reopened" then
"Reopened"

else
{Case.CaseStatus_t}

When I put the @Status on the report next to the CaseID in the CaseID group, it returns the correct values. When I put the @Status field in the Group @Status, I get three Open groups. For example:

North America
Open
2517 5/5/2005
Closed
2998 1/4/2005
Open
2907 5/4/2005
Open
3009 3/2/2005

When I put the Group Name in the @Status group it shows me the actual status of the case, not the @status formula status that I need. What I would like to see is:
Open
2517 5/5/2005
2907 5/4/2005
3009 3/2/2005

Closed
2998 1/4/2005

Any ideas?
 
I would remove the groups Report Date and CaseiD, and then go into the Sort expert and sort by Report Date DESC and CaseID.

You only need to group on these fields if you want to summarise by them, a simple sort should be adequate for your needs.

Ian Waterman
UK Crystal Reports Consultant
 
Actually given it some more though, it is more likely that your category group is causing this problem.

You do not mention this in your example, try opeing its header and putting in group name and see what is happening.

Ian
 
Thanks for your ideas on the sorting. I will give that a try.

I didn't think the category had any impact on it, but I will test it. It may be causing me problems too.

I'll let you know.
 
Well, after many hours I figured out what the biggest problem was - @Status Formula. I would evaluate and return a blank status field. I had to tweak the formula and WaLa, it worked.

Thanks for giving me ideas to go with, otherwise I would have been stuck!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top