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!

Design Report Not Working - Am I posting in the wrong forum?

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

 
Why are you duplicating dagent.logid? remove one instance in both the select and order by statements and try again.
 
Telerious - If you want the report to display both the agent name and their login ID number you would place LOGID into the queries two times. Then you format your table to have the first instance display the name (synonym) and the second display the number.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top