SSRS:自定义参数布局已从报告中删除

时间:2018-04-03 22:46:45

标签: reporting-services parameters sql-server-2014

当我向报表添加参数时,将其添加到查询中并在计算字段中使用它,运行报表时会出现此错误:

  

"自定义参数布局已从报告中删除。 SQL Server 2014   Reporting Services及更早版本不支持自定义参数   。布局"

我的报告会运行,但不返回任何行,只返回列标题。

我的参数类型为日期/时间

我的查询是:

    SELECT HD_QUEUE.NAME as qname, HD_TICKET.ID, HD_TICKET.CREATED, HD_TICKET.TIME_CLOSED, CUSTOMER.FULL_NAME as custfullname, 
 HD_STATUS.NAME as statname, HD_TICKET.TITLE, left(ASSIGNEE.FULL_NAME, 40) as assignee, 
 HD_PRIORITY.NAME as pname, HD_CATEGORY.NAME as catname
FROM  HD_TICKET 
 INNER JOIN HD_QUEUE
ON HD_TICKET.HD_QUEUE_ID = HD_QUEUE.ID
INNER JOIN USER CUSTOMER
ON HD_TICKET.SUBMITTER_ID=CUSTOMER.ID
INNER JOIN USER ASSIGNEE
ON HD_TICKET.OWNER_ID=ASSIGNEE.ID 
 INNER JOIN HD_STATUS 
 ON (HD_TICKET.HD_STATUS_ID=HD_STATUS.ID) 
 AND (HD_TICKET.HD_QUEUE_ID=HD_STATUS.HD_QUEUE_ID)
INNER JOIN HD_PRIORITY
ON HD_TICKET.HD_PRIORITY_ID = HD_PRIORITY.ID
  and HD_TICKET.HD_QUEUE_ID = HD_PRIORITY.HD_QUEUE_ID
  INNER JOIN HD_CATEGORY
ON HD_TICKET.HD_CATEGORY_ID = HD_CATEGORY.ID
and HD_TICKET.HD_QUEUE_ID = HD_CATEGORY.HD_QUEUE_ID
left join ASSET on ASSET.ID = HD_TICKET.ASSET_ID
left join ASSET_DATA_6 on ASSET.ASSET_DATA_ID = ASSET_DATA_6.ID
WHERE HD_STATUS.NAME = 'Closed'
AND HD_TICKET.TIME_CLOSED > DATE_SUB(@date_param, INTERVAL 34 DAY)
AND HD_TICKET.TIME_CLOSED <= @date_param;

我的计算字段是:

=IIf(Fields!closed_date.Value > (DateAdd(DateInterval.Day, -6, Parameters!date_param.Value)), "Week 1",
IIf(Fields!closed_date.Value > (DateAdd(DateInterval.Day, -13, Parameters!date_param.Value)), "Week 2",
IIf(Fields!closed_date.Value > (DateAdd(DateInterval.Day, -20, Parameters!date_param.Value)), "Week 3",
IIf(Fields!closed_date.Value > (DateAdd(DateInterval.Day, -27, Parameters!date_param.Value)), "Week 4",
"Week 5"))))

0 个答案:

没有答案