Use two different data sets in one report

I have two different data sets with different fields that are populated by two stored procedures with the same input parameters. Each dataset has different columns and about 180 columns, I am worried about how to use these two different date sets in one report with two differents fields (two differnt tables). For one data set, I used the report wizard, but could not find the second data set. Please suggest for the same.

+6
source share
4 answers

In one report, you can use two different data sets in different report regions. For example, if you have two data sets, say DS1 showing EmployeeDetail and DS2 showing SalesInfo. You can use them separately in two tables that display employee data and other sales data. If you plan to combine this data and use it in one table, this is an option.

  • Recommended option: rewrite your query to create a single dataset containing the possible data that you want to display in a table form.

  • It will work, but it will be much slower: use DS1 in the table in the main report, where each row contains an Epmloyee Detail, Wihtin, which Row calls a Sub-Report, passing the EmployeeDetail key, which is associated with the column in SalesInfo. Create a sub-report with SaledInfo data, call this report in the main message that transfers the key value from DS1 to this sub-report.

+10
source

Specify a dataset name in the third column Example:

=First(Fields!fieldname.Value,"DataSet1") 
+5
source

Using two different or several data sets in a report is not a problem at all if they do not belong to the same data area (charts, tables, etc.).

  • In addition to Ron's answer, if you want to retrieve data from different data sets in the same data area, you can also use Lookup or LookupSet in field expressions.
  • In addition, you can also create one data set and filter some data from it in the data areas. For example, if you have one large data set for all employees, and you want to display all employees who joined in 2012 in the table, you can filter the data set using the filter properties in the table.
+2
source

You can simply add multiple tables to your report and change the data_name from the tablix properties for each of your tables.

You will also need a binding source to populate this dataset.

 this.invoiceTableAdapter.Fill(this.ARQutationDataSet.invoice); 
0
source

Source: https://habr.com/ru/post/950652/


All Articles