简体   繁体   English

SSRS报告,共享布局,使用不同的数据集

[英]SSRS Report, shared layout, using different data sets

We need to create several reports but they all have the same exact layout. 我们需要创建几个报告,但是它们都具有完全相同的布局。 Rather than creating many reports, is it possible to create a single report that can conditionally be populated by different sets of data? 除了创建多个报告外,还可以创建一个可以有条件地由不同数据集填充的单个报告吗?

For example, say the report is a simple list of customer names and addresses. 例如,假设该报告是客户名称和地址的简单列表。 I would like to have a parameter that asks for a customer type. 我想有一个要求客户类型的参数。 A second drop down parameter list would only show customer subtypes directly related to the parent customer type. 第二个下拉参数列表将仅显示与父客户类型直接相关的客户子类型。 Can a parameter drop down be filtered based upon a selection in another parameter drop down? 是否可以基于另一个参数下拉列表中的选择来过滤参数下拉列表?

What other ways can I manage a single report layout but populate with different sets of data based on parameters? 我还可以通过什么其他方法来管理单个报表布局,但是可以根据参数填充不同的数据集?

is it possible to create a single report that can conditionally be populated by different sets of data? 是否可以创建一个可以有条件地由不同数据集填充的报告?

Yes, it is possible as long as the multiple data you use fits the structure of your report. 是的,只要您使用的多个数据适合报表的结构,就可以。 Using parameters you can populate your report with different data. 使用参数可以用不同的数据填充报告。

Can a parameter drop down be filtered based upon a selection in another parameter drop down? 是否可以基于另一个参数下拉列表中的选择来过滤参数下拉列表?

Yes, A parameter can be populated based on other parameter selection. 是的,可以基于其他参数选择来填充参数。 There are a lot of resources in the web that ilustrate how to achieve that functionality. 网络上有很多资源说明如何实现该功能。 Give a try and if you get stuck we are here. 试试看,如果您遇到问题,我们在这里。

What other ways can I manage a single report layout but populate with different sets of data based on parameters? 我还可以通过什么其他方法来管理单个报表布局,但是可以根据参数填充不同的数据集?

You can select the data in your report by using multiple parameters and a single dataset. 您可以使用多个参数和单个数据集来选择报告中的数据。 Then using SQL statements and parameters you can filter from where clause or create a flow in multiple select statements using T-SQL. 然后,使用SQL语句和参数,您可以从where子句进行过滤where或者使用T-SQL在多个select语句中创建流。 Something like 就像是

IF @my_param = 1
BEGIN
  select ...
END
ELSE
BEGIN
  select ...
END

Let me know if this helps you. 让我知道这是否对您有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM