简体   繁体   中英

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. Something like

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

Let me know if this helps you.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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