cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
andrea_stucchi
Engaged Sweeper
Hi all, I need to run a report that list the tickets a specific Agent has worked today.

No problems up to here, since I put the agent name "statically" inside the query. But in this way I need to make a report for each agent: 10 agents = 10 reports.

I would like to run a unique report that shows only tickets filtered by logged-in agent.
For Example: if I'm logged in with agent named Jhames I would like to output only jhame's tickets when I run the report.



Here the "static" report (agent name - Jhames):

Select Top 1000000 htblticket.ticketid As [Ticket Number],
htblticket.date As [Date Opened],
htblticket.updated As [Last Update],
htblticket.slaresolved As [Date Closed / Resolved],
htbltickettypes.typename As [Ticket Category],
htblticketstates.statename As [Ticket State],
tblAssets.AssetName As Asset,
htblticket.subject As Subject,
htblusers.name As [User],
htblusers1.name As Agent
From htblticket
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htbltickettypes On htblticket.tickettypeid =
htbltickettypes.tickettypeid
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Inner Join htblagents On htblagents.agentid = htblticket.agentid
Inner Join htblusers htblusers1 On htblagents.userid = htblusers1.userid
Inner Join tblAssets On htblticket.assetid = tblAssets.AssetID
Where htblticket.updated > DateAdd(day, DateDiff(day, 0, GetDate()), 0) And
htblusers1.name = 'Jhames'
Order By [Last Update] Desc,
[Date Opened] Desc,
[Ticket State],
[Ticket Category]



0 REPLIES 0