在 SSRS 2005 中,有没有一种方法可以创建两个并排的 6 行表,以便每个表(或矩阵)具有相同数据集的一部分?
这是我用于数据集的查询。
Select
Equipment_EquipmentID,
Equipment_Description,
Vendor,
Operator,
JobAccount_TrackingID
from
(
Select row_number() over (partition by Equipment_EquipmentID order by JobAccount_TrackingID) row,*
from
(
SELECT DISTINCT
CustomizedFieldLogEquipmentJobAccount_1.Equipment_EquipmentID,
CustomizedFieldLogEquipmentJobAccount_1.Equipment_Description,
NULL as Vendor,
NULL as Operator,
CustomizedFieldLogEquipmentJobAccount_1.JobAccount_TrackingID
FROM
CustomizedFieldLogEquipmentJobAccount AS CustomizedFieldLogEquipmentJobAccount_1 INNER JOIN CustomizedAccount ON CustomizedFieldLogEquipmentJobAccount_1.Account_AccountID = CustomizedAccount.AccountID
WHERE
(CustomizedAccount.AppliesToEquipment = 1)
AND
(CustomizedFieldLogEquipmentJobAccount_1.FieldLog_FieldLogID =@FieldLogID)
--AND
--IsRented = 0
Union
Select Distinct
Equipment_EquipmentID,
Equipment_Description,
Null as Vendior,
NULL as Operator,
fake_TrackingID
FROM
CustomizedFieldLogEquipment
cross join
(
Select 'zzz01' fake_TrackingID
union Select 'zzz02'
union Select 'zzz03'
union Select 'zzz04'
union Select 'zzz05'
union Select 'zzz06'
union Select 'zzz07'
union Select 'zzz08'
union Select 'zzz09'
union Select 'zzz10'
) a where FieldLog_FieldLogID = @FieldLogID --AND IsRented = 0
) b
) c where Row<=6
order by Equipment_EquipmentID,JobAccount_TrackingID
TrackingiD 是我的矩阵中的列,我需要显示总共 6 列天气或那里没有数据(因此是假的 TrackingIds)查询效果很好。但是,如果行数大于 6,我需要能够在报告中的两个矩阵控件之间拆分查询结果。本质上,我需要 2 个 6x6 表。它需要工作的方式很奇怪。如果查询结果返回超过 6 行,则用户希望其余记录流到第二个表。有点像下图:
由此:
对此:
我已经在表单上获得了两个矩阵控件,但是如果行数大于 7 左右,我无法弄清楚如何在两个表之间拆分数据集。
这可能吗?如果有怎么办?我已经进行了一些搜索,但无法弄清楚如何将单个记录集拆分为两个矩阵控件。任何帮助表示赞赏。我一直试图告诉用户这不是一个表单打印程序,而是一个旨在报告数据库中内容的程序。
谢谢