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

CMS Design Reports Syntax error 1

Status
Not open for further replies.

DJB45030

MIS
Feb 6, 2008
5
US
I'm having an awful time trying to design a report. I need a historical report with 2 databases, dagent and haglog. I have 2 queries. One for data, the second for totals. Am having trouble with the "Where". For SELECT I have:

dagent.LOGID
dagent.LOGID
sum(dagent.TI_STAFFTIME)
dagent.sum(TOTAL_I_ACDTIME)
sum(dagent.I_RINGTIME)
dagent.sum(EXT_IN_TIME)
dagent.sum(EXT_OUT_TIME)
sum(dagent.TI_AVAILTIME)
sum(dagent.TI_AUXTIME)
dagent.sum(TOTAL_ACDCALLS)
dagent.sum(EXT_CALL_IN)
dagent.sum(EXT_CALL_OUT)
sum(dagent.TI_AUXTIME2)
sum(haglog.LOGIN)
sum(haglog.LOGOUT)

WHERE
ROW_DATE = [Date:] and ACD=$acd and LOGID in (select value from agroups where acd_no=$acd and item_name=[Agent Group:]) GROUP BY 1,2 ORDER BY dagent.LOGID, dagent.LOGID

Get the following error:
Group by 1, 2 **ERROR** order by dagent.LOGID,dagent.LOGID

Was getting an error earlier about column not being in the GROUP BY LIST if I removed the ORDER BY

 
Two things to look at:

1) In my experience Report designer doesn't work well when you try to join tables within one query. Try creating a separate query for the haglog info and one for the dagent info. this will also require you to put two separate tables onto the report so you may need to play with the where statement by adding an ORDER BY at the end to force the proper sorting.

2) for your login and logout are you looking for the time the agent first logged into the phone and last logged out (ignoring any logouts during the day because of skill changes, etc)? If so, you need to use MIN(LOGIN) and MAX(LOGOUT)
 
Thank you so much wil19148. You don't know how much I really appreciate your help. I'm new to this CMS design stuff and was ready to pull my hair out.
 
Wil19148

I got the report to work, thanks to your reply as to what to look at. Thank you, Thank you, Thank you!!!!!! I've been working on this new report for weeks, and again Thanks to you I got it to work now.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top