Home > database >  Need to bind two dataset to a tablix. Please find image in description, how to achieve this kind of
Need to bind two dataset to a tablix. Please find image in description, how to achieve this kind of

Time:10-14

I am using vs 2008. I want below structure in my rdl. Rdl having two dataset.

  1. one for main tablix to display name, email id, mobile, address
  2. second for medical issues

enter image description here

CodePudding user response:

You can only bind a tablix to one dataset. The only way you can do this is to either

  1. combine the data in your dataset query or, if that is not possible
  2. use the LOOKUP() function to get the required data from your second dataset

You can read more about LOOKUP() here

https://docs.microsoft.com/en-us/sql/reporting-services/report-design/report-builder-functions-lookup-function?view=sql-server-ver15

CodePudding user response:

I think your best bet would be to have the Medical Issues as a Subreport in your main table of employees.

Create a new report with just the Medical issues part of the table. You can copy the existing report and remove the main elements. Add a parameter for the Employee ID and filter the dataset by it.

The unneeded datasets can be removed - the main report doesn't need the Medical Issues and the Medical Issues doesn't need the Employee dataset.

In the main report, where you have your Medical Issues, insert a subreport. Select the Medical Issues report you created and link it by employee ID.

For more details, see MS Docs: add a subreport and parameters

  • Related