对于给定的场景,我为 SSRS 留下了哪些选项

What options am I left with SSRS for given scenario

我有如下数据库关系,

MasterEmployee
   EmployeeName
   ...Other Employee Details
   EmployeeAddress
       HistoryOfAddresses (dataset)
   EmployeePositions
       CurrentAndHistoryOfPositions (another dataset)
   .... other datasets

我需要为上面创建一个 SSRS 报告,我认为最好的方法是创建一个主工作表,然后为每个子数据集添加一个工作表。

为了实现上述目标,我有一个 SQL 查询 returns 我在下面,

<Employees>
      <Employee>
          <ID>185</ID>
          <Name>18_108669635</Name>
          ... Other attributes

          <Addresses>
              <Address>
                  <ID>1</ID>
                  <Location>79 Baker Street</Location>
                  <CurrentAddress>false</CurrentAddress>
              </Address>
              .. Other addresses
          </Addresses>
          <Other datasets like positions in company etc..>
      </Employee>
</Employees>

现在我无法弄清楚如何使用上面的这个数据集在 ssrs 报告中显示它以及如何?

我想出了我需要做什么来实现我的目标,

1) 将多个数据集添加到一个报告中,然后为每个数据集创建一个新的table

2) 在 tablix 属性中为每个 table 添加页面名称和分页符,我想在 excel.

中显示为不同的 sheet

3) 保存此 rdl 文件,然后使用代码隐藏添加几个数据集,如 post、

中所述

Using multiple datasets in RDLC

4) 渲染报告并将其导出为 excel 在代码后面。

我希望它能帮助其他人做类似的事情。

5) 我仍然需要在 master 中添加 Vlookups sheet 但那是另一回事了。