This is a migrated thread and some comments may be shown as answers.

Report With muitiple data sources

2 Answers 154 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 23 Sep 2014, 06:34 PM
I am trying to create a report with multiple data sources so
that I can access various fields in the report. For example, a list or a
crosstab that would display rows of aggregate data derived from different queries. So
far as I can tell, these controls can only be bound to one data source. Moreover,
the report itself can only be bound to one data source. So how do I create a
table, list or crosstab of rows that uses data from several queries?

Sequel Server Report Server (SSRS) supports this by being
able to add multiple data sources to the report and then you are able to drag
fields from which ever on you want into any textbox on the report you wish. See attached:

2 Answers, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 26 Sep 2014, 11:42 AM
Hi Mark,

A Telerik report is a template repeated for each record in the assigned to it data. You can use different data sources to feed the report and data items in it, but using different data sources to supply data for a single data item's DataSource is not supported.

I can suggest you the following options:
  1. Create a data retrieval method that gathers the needed information into a single set of data, which has a tabular representation. For example use a SQL query which joins the tables logically and returns the needed records.
    This approach allows you to use a single data source component to access the needed data;
  2. Use a separate data item (Table) for each set of records you want to display;
  3. Use custom functions in the report, which access data not related to the report's DataSource. This approach is not recommended due to the additional resources that will be used - Performance Considerations;

I hope the above information is helpful.

Regards,
Stef
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Mark
Top achievements
Rank 1
answered on 26 Sep 2014, 01:16 PM
Thank you for you reply. I ended up just creating a new data object in the code behind that adds each of the query results to a datatable and then binds it to the display table. It is a little more work but does the job just fine.
Tags
General Discussions
Asked by
Mark
Top achievements
Rank 1
Answers by
Stef
Telerik team
Mark
Top achievements
Rank 1
Share this question
or