1

I am designing SSRS 2005 report which has four subreports within a main report. The report has a group header containing "name" dataset field .Each subreport is grouped on the same "name" field.This name field is also one of the column for the dataset of each subreport.

A rough format of the report is as shown below(For each name field of the main report dataset we have four sub reports)

enter image description here

I tried adding header with image as a group header of a table and subreports as table rows with all rows grouped by name field but i am getting the same data in each report. Can someone please guide me how to go about to get the desired output.

xdev
  • 641
  • 6
  • 18
  • 38

2 Answers2

1

In order for subreports to filter the data from the parent report, you'll need to match a field from your main report (NAME?) with the field in your subreport using the Subreport Properties' Parameters tab.

You should have a Parameter in your subreport and a Filter on the subreports data that uses the parameter. This way, each record in the main report will have each subreport filtered by your grouping field.

For more info: https://technet.microsoft.com/en-us/library/dd239314(v=sql.110).aspx

Hannover Fist
  • 10,393
  • 1
  • 18
  • 39
  • do the parameters you are mentioning need to be present in the sub report's dataset query – xdev Apr 15 '15 at 13:55
  • You don't **have** to use the **Parameters** in the Dataset query - but that's the best way for performance purposes.The parameters can be used in the **FILTER ** of the Dataset, or the FILTER of your subreport table(s). It's best to do it in the Dataset (as a FILTER or Parameter) rather than the individual tables and charts so there's only one thing to change. – Hannover Fist Apr 15 '15 at 17:14
0

You need to wrap the whole thing (header and subreports) in a List, and populate the List from your "Main" dataset. Then pass values from the List's dataset to the subreports and header.

Tab Alleman
  • 31,483
  • 7
  • 36
  • 52