我在报告生成器 3 中遇到 SSRS 报告问题。我正在尝试使用一个参数来显示文本而不是字段的 int 数据类型。每次我尝试预览报表时,报表生成器都会吐出一个错误。我已经尝试转换和转换数据类型,但仍然得到同样的错误。任何见解将不胜感激。以下是参数来源的查询和错误消息。
- 询问
select distinct case convert(varchar(10),workorderstatusid)
when '1' then 'Open'
when '2' then 'Closed'
when '105' then 'OnHold'
when '101' then 'Cancelled'
end as 'Status'
from tasks
- 错误信息
Cannot read the next data row for the dataset DataSet1. (rsErrorReadingNextDataRow)
----------------------------
An error has occurred during report processing. (rsProcessingAborted)
-- 数据集 1 - 主查询
select wo_num as 'Word Order ID',isnull(dept,'Unassigned') as 'Department',
task as 'Summary', isnull(descript, 'No Description') as 'Notes',
respons as 'Assigned Technician', duedate as 'Due Date',completed as 'Date Completed',
isnull(status,'Incomplete') as 'Status'
from tasks
where (workorderstatusid =@status)
and (dept=@department)
order by wo_num asc