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

Grouping and null records

Status
Not open for further replies.

src2

Technical User
Mar 1, 2001
72
US
I have a CR8.5 report that groups by call type giving a group count. The report is working fine. Lately it was discovered that the call type field wasn't required and lots of records were entered without a call type. I wanted to modify the report so that all the records without a call type would be included in the count for one of the existing call types. I tried a couple of different formulas but without the success that I wanted. Here is a sample of the code:

if Isnull({CR_View_for_Steve.CallType}) then "Service Request"
else if {CR_View_for_Steve.CallType} = "Service Request" then "Service Request"
else if {CR_View_for_Steve.CallType} = "Access Request" then "Access Request"
else if {CR_View_for_Steve.CallType} = "Consultation" then "Consultation"
else if {CR_View_for_Steve.CallType} = "Engineer Request" then "Engineer Request"
else if {CR_View_for_Steve.CallType} = "Install Request" then "Install Request"
else if {CR_View_for_Steve.CallType} = "Phone Request" then "Phone Request"
else if {CR_View_for_Steve.CallType} = "T&M Request" then "T&M Request"

The report runs but I end up with 2 groups that say service request. The first group is where service request was actually selected. The last group is also a group that says service request and the count matches the number of records that call type wasn't selected. My question is two-fold: Does anyone know why the records doesn't fall into just one group called service request and how do I get it to do what I want.

Thanks
 
hi
you have
isnull will return a group and you have also
{CR_View_for_Steve.CallType} = "Service Request" then "Service Request"
that will return you ans other group
try this
-------------

if
Isnull({CR_View_for_Steve.CallType}) or
({CR_View_for_Steve.CallType} = "Service Request")
then
"Service Request"
----------------------------

this will return 1 group for both

pgtek

 
You could try:

if (isnull({CR_View_for_Steve.CallType}) or({CR_View_for_Steve.CallType}) = "Service Request") then "Service Request" else
{CR_View_for_Steve.CallType}

-LB
 
Try this one:

if (Isnull ({CR_View_for_Steve.CallType}) or {CR_View_for_Steve.CallType}="Service Request") then
"Service Request" else {CR_View_for_Steve.CallType}

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top