Hello Reecardo,
Thanks for the reply. However, adding the above statement did not worked. Below are the steps I followed to create an SQL Based report in SD Portal:
1. Create Standard Report
2. Select Default Data Source
3. Select SQL Query in Data tab.
4. Pasted below query:
DECLARE @date1 DATETIME
DECLARE @date2 DATETIME
select distinct
Process.ReportLogProcessID as [Process.ReportLogProcessID],
Process.ReportProcessID as [Process.ReportProcessID],
Process.ProcessStarted as [Process.ProcessStarted],
Process.Result as [Process.Status],
Process.SessionID as [Process.SessionID],
Process.ProcessViewerPageID as [Process.ProcessViewerPageID],
ImIncidentTicket0.ProcessId as [Incident.ProcessId],
ImIncidentTicket0.IncidentName as [Incident.IncidentName],
ImIncidentTicket0.IncidentType as [Incident.IncidentType],
ImIncidentTicket0.Classification as [Incident.Classification],
ImIncidentTicket0.AffectedLocation as [Incident.AffectedLocation],
ImIncidentTicket0.Priority as [Incident.Priority],
ImIncidentTicket0.CurrentlyAssignedQueueName as [Incident.CurrentlyAssignedQueueName],
ImIncidentTicket0.ResolvedBy as [Incident.ResolvedBy]
from
ReportProcess as Process with (NOLOCK) inner join
ImIncidentTicket as ImIncidentTicket0 with (NOLOCK) on
((ImIncidentTicket0.ProcessId = Process.ReportProcessID)) left outer join
ReportProcessReference as ReportProcessReference1 with (NOLOCK) on
((ReportProcessReference1.SessionID = Process.SessionID))
where
Process.ReportProcessID like '%%' and
Process.Result in ('Closed','Resolved','Completed')
and
Process.ProcessStarted BETWEEN @date1 and @date2
order by
[Incident.IncidentName] asc
However, I have not got any results. Also when attempted to open the report, it just said no data to display.
Kindly guide / advise on anything I would have missed.