I'm not sure if this problem can be solved via a forum but I'm willing to give it a try. Maybe someone will see something I'm doing wrong... actually a consultant group created this report 2 years ago and all was fine at first but now after collecting two years of data things are getting bad. To run this report for range of one month is taking well over 8 hours. So maybe someone will spot someting I can change to hopefully make a difference.
I'm not sure what I can include to make it easier for someone to help me so I'll start with this. This report is supposed to find the number of duplicate problems logged to a support desk.
Someone figured that we need to compare the tickets logged and if a particular customer has two or more tickets under the same category, such as Hardware\Printers\Laserjet, within a two week period, those must be duplicate calls indicating the customer did not call back on the existing ticket number but instead created a new ticket. Obviously not very accurate but apparently good enough for mgmt.
I guess the consultant that created this report was hoping it would ONLY sort through the records within the date range provided but it doesn't appear to be doing that. There also appears to a subreport called total and percent but I'm not sure how to view subreports.
Below is the record selection formula used and the SQL query if that helps:
if {call_req_1.id}<> {call_req.id} and {call_req.customer} = {call_req_1.customer}
and {call_req.category} = {call_req_1.category} and {call_req.group_id}={call_req_1.group_id}
and {call_req.group_id} = 404162 and {call_req_1.group_id} = 404162
and Abs ({call_req.open_date}-{call_req_1.open_date}) < 864000000
and Abs ({call_req.open_date}-{call_req_1.open_date}) <> 0
and (DateTimeToDate (PDMTimeToDateTime ({call_req.open_date})) >= {?StartDate})
and (DateTimeToDate (PDMTimeToDateTime ({call_req.open_date})) <= {?EndDate})
and (DateTimeToDate (PDMTimeToDateTime ({call_req_1.open_date})) >= {?StartDate})
and (DateTimeToDate (PDMTimeToDateTime ({call_req_1.open_date})) <= {?EndDate})
and UpperCase ({ctct.c_userid}) <> "UNKNOWN"
then true
else
false
*** ___________________________________ ****
SELECT
call_req."id", call_req."ref_num", call_req."open_date", call_req."group_id", call_req."customer", call_req."category",
call_req_1."id", call_req_1."open_date", call_req_1."group_id", call_req_1."customer", call_req_1."category",
ctct."c_userid"
FROM
{ oj ("AHD"."AHD"."call_req" call_req INNER JOIN "AHD"."AHD"."ctct" ctct ON
call_req."customer" = ctct."id")
INNER JOIN "AHD"."AHD"."call_req" call_req_1 ON
call_req."group_id" = call_req_1."group_id"}
WHERE
call_req."group_id" = 404162 AND
call_req_1."group_id" = 404162
ORDER BY
ctct."c_userid" ASC,
call_req."ref_num" ASC
I'm not sure what I can include to make it easier for someone to help me so I'll start with this. This report is supposed to find the number of duplicate problems logged to a support desk.
Someone figured that we need to compare the tickets logged and if a particular customer has two or more tickets under the same category, such as Hardware\Printers\Laserjet, within a two week period, those must be duplicate calls indicating the customer did not call back on the existing ticket number but instead created a new ticket. Obviously not very accurate but apparently good enough for mgmt.
I guess the consultant that created this report was hoping it would ONLY sort through the records within the date range provided but it doesn't appear to be doing that. There also appears to a subreport called total and percent but I'm not sure how to view subreports.
Below is the record selection formula used and the SQL query if that helps:
if {call_req_1.id}<> {call_req.id} and {call_req.customer} = {call_req_1.customer}
and {call_req.category} = {call_req_1.category} and {call_req.group_id}={call_req_1.group_id}
and {call_req.group_id} = 404162 and {call_req_1.group_id} = 404162
and Abs ({call_req.open_date}-{call_req_1.open_date}) < 864000000
and Abs ({call_req.open_date}-{call_req_1.open_date}) <> 0
and (DateTimeToDate (PDMTimeToDateTime ({call_req.open_date})) >= {?StartDate})
and (DateTimeToDate (PDMTimeToDateTime ({call_req.open_date})) <= {?EndDate})
and (DateTimeToDate (PDMTimeToDateTime ({call_req_1.open_date})) >= {?StartDate})
and (DateTimeToDate (PDMTimeToDateTime ({call_req_1.open_date})) <= {?EndDate})
and UpperCase ({ctct.c_userid}) <> "UNKNOWN"
then true
else
false
*** ___________________________________ ****
SELECT
call_req."id", call_req."ref_num", call_req."open_date", call_req."group_id", call_req."customer", call_req."category",
call_req_1."id", call_req_1."open_date", call_req_1."group_id", call_req_1."customer", call_req_1."category",
ctct."c_userid"
FROM
{ oj ("AHD"."AHD"."call_req" call_req INNER JOIN "AHD"."AHD"."ctct" ctct ON
call_req."customer" = ctct."id")
INNER JOIN "AHD"."AHD"."call_req" call_req_1 ON
call_req."group_id" = call_req_1."group_id"}
WHERE
call_req."group_id" = 404162 AND
call_req_1."group_id" = 404162
ORDER BY
ctct."c_userid" ASC,
call_req."ref_num" ASC