Often, when creating reports, we have to deal with databases that are far from ideal. The various "features", sometimes get us stuck. For example, how to build a report based on multiple datasets, which will result in MS SQL stored procedures? When you create a data source in the report, we can use a stored procedure in SQL query, but only for a specific table. This means that it will take only a first set of data returned by the stored procedure. To generate multiple tables of the results of a stored procedure, we need to create a data source software in the code of a custom application.
You need to create a database connection, execute the stored procedure, and enter its results into the dataset. Then we transfer dataset to the report and record the data source in the report. In this way, in the designer we will receive the prepared data source when making the report. We can go further and programmatically connect to the report source, so it's already in the data tree. But ...