0

I've built a SQL report in MS SQL Server Report builder for our ticketing backend. I want to be able to do custom reporting. I've created this report by using the following query:

SELECT
  SR_Service.Date_Closed
  ,SR_Service.Date_Entered
  ,SR_Service_SLA_Workflow.Responded_Minutes
  ,AVG(SR_Service_SLA_Workflow.Resolved_Minutes) AS Avg_Resolved_Minutes
  ,SR_Service.Hours_Budget
  ,SR_Service_SLA_Workflow.SR_Service_RecID AS [SR_Service_SLA_Workflow SR_Service_RecID]
  ,SR_Service.SR_Service_RecID AS [SR_Service SR_Service_RecID]
  ,SR_Service.Company_RecID AS [SR_Service Company_RecID]
  ,Company.Company_RecID AS [Company Company_RecID]
  ,Company.Company_ID
FROM
  Company
  INNER JOIN SR_Service
    ON Company.Company_RecID = SR_Service.Company_RecID
  INNER JOIN SR_Service_SLA_Workflow
    ON SR_Service.SR_Service_RecID = SR_Service_SLA_Workflow.SR_Service_RecID
GROUP BY
  SR_Service.Date_Closed
  ,SR_Service.Date_Entered
  ,SR_Service_SLA_Workflow.Responded_Minutes
  ,SR_Service.Hours_Budget
  ,SR_Service_SLA_Workflow.SR_Service_RecID
  ,SR_Service.SR_Service_RecID
  ,SR_Service.Company_RecID
  ,Company.Company_RecID
  ,Company.Company_ID

With a few filters set on company must not equal (some inactive companies i dont care about)

Obviously, you cannot tell this is a correct query because you don't see my database. However... it works. the report builds and I have a 2 line table, one with Customer names and the second is average time it takes to close our tickets by hours (taken minutes/60)

What I need: The ability to, when I run this report, have it ask for a date range. This can be either a few options (last week, last month, running thirty dates) OR just a place where they select a date range.

3
Contributors
2
Replies
8
Views
5 Years
Discussion Span
Last Post by thedubL
0

What I need: The ability to, when I run this report, have it ask for a date range. This can be either a few options (last week, last month, running thirty dates) OR just a place where they select a date range.

You can read this (it will show you how to group the dates):

http://msdn.microsoft.com/en-us/library/dd220417.aspx

0

Create a store procedure that the report calls. Have the start_date and End_date as variables.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.