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

Grouping not working anymore.

Status
Not open for further replies.

jcrock

Programmer
Nov 7, 2003
4
US
In my report the grouping is no longer working. I group on @pam then by @month. I was getting a report with each group(@pam) with one month for each month selected by from-to parameters. This was working (and still is working if I use older dates i.e. Jan. thru Mar. or Mar thru Apr of last year). Now I am getting (under Sales - Service) one month for each month selected by from-to parameters for each {IWrkgrpQueueStats.cName}. We added "Payoff", "StopPayment", and "VISA-CC". Is there a limitation in Crystal? I can take a 4 or more groups out of @pam (doesn't matter which ones) and it works. Need Help!

Sample (old):

345 Dollar-CC
October
November
December
BMSS
October
November
December
(we'll skip some groups)
Sales - Service
October
November
December
Visa-Loan
October
November
December

Sample (Now):

345 Dollar-CC
October
November
December
BMSS
October
November
December
(we'll skip some groups)
Sales - Service
October
November
December
October
November
December
October
November
December
October
November
December
October
November
December
October
November
December
October
November
December
October
November
December
(and so on...)
Visa-Loan
October
November
December

I have a selection formula of:

{IWrkgrpQueueStats.dIntervalStart} in {?startdate} to {?enddate} and
{IWrkgrpQueueStats.cName} in ["345 Dollar-CC", "BMSS", "Business CD-CC", "Central Servicing", "Internet-CC", "Mortgage-CC", "Operations", "Operator", "Payoff", "PRO", "Push Button Banking-CC", "Retirement Savings", "Sales-CC", "Services-CC", "StopPayment", "VISA-CC", "Visa-Loan"]

and a formula for grouping called @pam :

if({IWrkgrpQueueStats.cName}="345 Dollar-CC" or {IWrkgrpQueueStats.cName}="Business CD-CC" or {IWrkgrpQueueStats.cName}="Internet-CC" or {IWrkgrpQueueStats.cName}="Mortgage-CC" or {IWrkgrpQueueStats.cName}="Sales-CC" or {IWrkgrpQueueStats.cName}="Services-CC" or {IWrkgrpQueueStats.cName}="StopPayment" or {IWrkgrpQueueStats.cName}="Payoff" or {IWrkgrpQueueStats.cName}="Operations" or {IWrkgrpQueueStats.cName}="VISA-CC") then "Sales - Service" else {IWrkgrpQueueStats.cName}

and a formula for grouping called @mymonth :

if(Month ({IWrkgrpQueueStats.dIntervalStart})=1) then "January" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=2) then "February" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=3) then "March" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=4) then "April" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=5) then "May" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=6) then "June" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=7) then "July" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=8) then "August" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=9) then "September" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=10) then "October" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=11) then "November" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=12) then "December" else "Error"
 
First, simplify and alter this:

grouping called @pam :

if isnull({IWrkgrpQueueStats.cName})or
trim({IWrkgrpQueueStats.cName}) = "" then
"Unknown"
else
if {IWrkgrpQueueStats.cName} in
["345 Dollar-CC", "Business CD-CC","Internet-CC"
//... you get the idea
then
"Sales - Service"
else
{IWrkgrpQueueStats.cName}

I suspect that you may have something odd in
{IWrkgrpQueueStats.cName}
Your month formula is OK for display, but shouldn't be used for grouping (which from your output it's not, it's just for display purposes) as April would come first since it would be grouped by text.

To group by month, select the date field as the grouping field and change the Section will be printed to For Each Month.

Now you can use your formula for display purposes or format the date field to do the same by right clicking it and selecting format field and just displaying the month (although you should probably select the year too in case the ranges cross over a year).

Hope this resolves.

-k
 
Thanks for the help synapsevampire. I tried what you said to no avail. The reason we select only a few {IWrkgrpQueueStats.cName} is because there are too many others we do not want in the report (i.e. default queues and different departments - this is a call center database that tracks all calls by department). If you have any other ideas I would greatly appreciate them.

Thanks again.
 
I have a selection formula of:

{IWrkgrpQueueStats.dIntervalStart} in {?startdate} to {?enddate} and
{IWrkgrpQueueStats.cName} in "345 Dollar-CC", "BMSS", "Business CD-CC", "Central Servicing", "Internet-CC", "Mortgage-CC", "Operations", "Operator", "Payoff", "PRO", "Push Button Banking-CC", "Retirement Savings", "Sales-CC", "Services-CC", "StopPayment", "VISA-CC", "Visa-Loan"

******************************

this should be with square brackets

I have a selection formula of:

{IWrkgrpQueueStats.dIntervalStart} in {?startdate} to {?enddate} and
{IWrkgrpQueueStats.cName} in [ "345 Dollar-CC", "BMSS", "Business CD-CC", "Central Servicing", "Internet-CC", "Mortgage-CC", "Operations", "Operator", "Payoff", "PRO", "Push Button Banking-CC", "Retirement Savings", "Sales-CC", "Services-CC", "StopPayment", "VISA-CC", "Visa-Loan" ];

******************************
and a formula for grouping called @pam :

if({IWrkgrpQueueStats.cName}="345 Dollar-CC" or {IWrkgrpQueueStats.cName}="Business CD-CC" or {IWrkgrpQueueStats.cName}="Internet-CC" or {IWrkgrpQueueStats.cName}="Mortgage-CC" or {IWrkgrpQueueStats.cName}="Sales-CC" or {IWrkgrpQueueStats.cName}="Services-CC" or {IWrkgrpQueueStats.cName}="StopPayment" or {IWrkgrpQueueStats.cName}="Payoff" or {IWrkgrpQueueStats.cName}="Operations" or {IWrkgrpQueueStats.cName}="VISA-CC") then "Sales - Service" else {IWrkgrpQueueStats.cName}

********************************

can be simplified to

if {IWrkgrpQueueStats.cName} in [ "345 Dollar-CC","Business CD-CC","Internet-CC","Mortgage-CC","Sales-CC","Services-CC","StopPayment","Operations","VISA-CC" ] then
"Sales - Service"
else
{IWrkgrpQueueStats.cName};

************************
and a formula for grouping called @mymonth :

if(Month ({IWrkgrpQueueStats.dIntervalStart})=1) then "January" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=2) then "February" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=3) then "March" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=4) then "April" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=5) then "May" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=6) then "June" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=7) then "July" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=8) then "August" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=9) then "September" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=10) then "October" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=11) then "November" else if(Month ({IWrkgrpQueueStats.dIntervalStart})=12) then "December" else "Error"

************************

can be simplified to

if not isnull({IWrkgrpQueueStats.dIntervalStart}) then
totext({IWrkgrpQueueStats.dIntervalStart},"MMMM")
else
"Error";


this make for easier diagnosis :)

you don't seem to be trapping "345 Dollar-CC" in the @Pam grouping ...this should be going into the Sales - Service group


other than that I don't think the repeat of data is a formula problem but rather a linkage problem Has anything changed there???

Jim Broadbent

The quality of the answer is directly proportional to the quality of the problem statement!
 
Is it possible that you used the revised formula for the groupname, but did not actually group on it, and instead still have the old grouping formula as your group? I think you might get results like this if this is what you did.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top