Notification

Icon
Error

Helpdesk report for tickets for all on one reason - But different sub reasons.

Posted: Monday, February 22, 2021 7:22:56 PM(UTC)
TimHolmes1973

TimHolmes1973

Member Original PosterPosts: 30
0
Like
I have set the HD up this way and need to run the report from this site.
https://www.lansweeper.c...category.aspx#post55047
But I want to add each ticket reason beneath, not just one, so I thought this would work but it did not, how can I add the next category.
Reason for ticket>
Hardware Related
Software Related
ETC.
I can get it if just the hardware related is there, but when I try to add software related, it shows no results.
Any advice please.

Select Distinct Top 1000000 htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblticket.date,
htbltickettypes.typename,
htblticketstates.statename,
htblticket.subject,
htblusers1.name As [User Name],
htblusers.name As [Help Desk Agent Name],
Reasonforticket.data As [Reason for ticket],
HardwareRelated.data As [Hardware Related],
SoftwareRelated.data As [Software Related]
From htblticket
Left Join htblagents On htblagents.agentid = htblticket.agentid
Left Join htblusers On htblusers.userid = htblagents.userid
Inner Join htblusers htblusers1 On htblusers1.userid = htblticket.fromuserid
Left Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htbltickettypes On htbltickettypes.tickettypeid =
htblticket.tickettypeid
Inner Join (Select Top 1000000 htblticketcustomfield.ticketid,
htblticketcustomfield.data
From htblticketcustomfield
Inner Join htblcustomfields On htblcustomfields.fieldid =
htblticketcustomfield.fieldid
Where htblcustomfields.name Like 'Reason For Ticket') As Reasonforticket
On htblticket.ticketid = Reasonforticket.ticketid
Inner Join (Select Top 1000000 htblticketcustomfield.ticketid,
htblticketcustomfield.data
From htblticketcustomfield
Inner Join htblcustomfields On htblcustomfields.fieldid =
htblticketcustomfield.fieldid
Where htblcustomfields.name Like 'Hardware Related') As HardwareRelated On
htblticket.ticketid = HardwareRelated.ticketid
Inner Join (Select Top 1000000 htblticketcustomfield.ticketid,
htblticketcustomfield.data
From htblticketcustomfield
Inner Join htblcustomfields On htblcustomfields.fieldid =
htblticketcustomfield.fieldid
Where htblcustomfields.name Like 'Software Related') As SoftwareRelated On
htblticket.ticketid = SoftwareRelated.ticketid

Active Discussions

Lansweeper LSAgent Rescan Asset
by  marck1024   Go to last post Go to first unread
Last post: Today at 4:11:53 PM(UTC)
Lansweeper Allowing a role to create asset groups
by  mh6543   Go to last post Go to first unread
Last post: 2/26/2021 10:00:40 PM(UTC)
Lansweeper Creating a schduled task on remote computer
by  steveb  
Go to last post Go to first unread
Last post: 2/26/2021 7:44:48 PM(UTC)
Lansweeper Export LsAgent Assets
by  steveb   Go to last post Go to first unread
Last post: 2/26/2021 7:26:32 PM(UTC)
Lansweeper Asset management/replacement
by  RC62N  
Go to last post Go to first unread
Last post: 2/26/2021 6:30:22 PM(UTC)
Lansweeper Asset Uptime "Asset on total"
by  Andy.S   Go to last post Go to first unread
Last post: 2/26/2021 3:07:35 PM(UTC)
Lansweeper Scanning for Static Routes?
by  ChrisParr  
Go to last post Go to first unread
Last post: 2/26/2021 12:43:28 PM(UTC)