SSRS 是否可以将用户输入合并到报告中?

Is it possible in SSRS to incorporate user input into a report?

我有一份如下所示的报告(请忽略它看起来有多糟糕,它是早期草稿)

我希望用户能够 运行 他们喜欢的任何日期的报告(使用参数),然后在总轮班分钟数列中手动输入数字并让报告计算活动时间shift %(calls/total shift 分钟的时间)。这可能吗?如果可以,有人可以指导我完成吗?

我个人只是根据 SQL 查询来计算它。更容易,你应该能够达到相同的结果/

因为我对您的表或数据没有很好的理解,所以我将根据与工作中类似的结构对其进行建模。

这将是我用来生成报告的查询示例。

Declare @ReportStart date = '2016/08/01'    -- SSRS will automatically pick up parameter and add it
Declare @ReportEnd   date = '2016/09/01'    -- SSRS will automatically pick up parameter and add it
/*  - - - Exclude the Above in the SSRS Report Query - - - */


Select
    Agent
,   Calls_Handled
,   Calls_Outgoing
,   Total_TalkTime
,   avg.Talk_Time
,   Time_Woked

-- You can get Super Lazy here and just calculate it SQL Side 
--Not too sure as i dont have DBMS to test in but the below should work?
,   Cast(SUM((Cast(Total_TalkTime as FLOAT) / CAST(Time_Woked as FLOAT))*100) as Numeric(4,2)) as [%_Active]
FROM
(
SELECT
    Resource_Name as [Agent]

,   SUM( -- Calculate total Incoming Calls Handled
        Case When [Contact_Type] in ('Incoming') THEN 1
    END) as [Calls_Handled]

,   SUM( -- Calculate total outgoing Calls Made
        Case When [Contact_Type] in ('Outgoing') THEN 1
    END) as [Calls_Outgoing]

,   SUM(Talk_Time) as [Total Talk_Time] -- Calculate Total TalkTim
,   AVG(Talk_Time) as [avg.Talk_Time]   -- Calculate Average TalkTime
From
    dbo.tbl_Cisco_Calls
WHERE
    Even_Time between @ReportStart and @reportEnd
GROUP BY
    Agent
) as call
JOIN
(
    Select
        Agent
    ,   DateDiff(minute,Login_Time, Logout_Time) as [Time_Woked]
    FROM
        tbl_Cisco_Event
    WHERE
        Event_Time between @reportStart and @reportEnd
    Group By
        Agent
) as event
on call.Agent = event.Agent

将报告加载到 SSRS 后,它应该会自动选取参数@ReportStart 和@ReportEnd。然后我会将它们的类型调整为日期,以便它们可以用作日历。然后你就完成了伙计。

你也可以在SSRS中做计算

它将拾取实体所以我可以做到

[Total_TalkTime]/[Time_Worked] 

然后右键单击该单元格,我可以select将数字类型设置为百分比(与Excel 关闭内存完全相同)

如前所述,尽管在 SQL 环境中执行此操作要容易十倍