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

Dataset with multiple DataTables

1 Answer 281 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
mkasuboski
Top achievements
Rank 1
mkasuboski asked on 08 Apr 2009, 07:49 PM
I was wondering if I can set a report's datasource equal to a Dataset that contains multiple datatables, and in the code-behind for the report set the different sections to a specific table from the dataset, i.e. the ReportHeader Section, the Detail Section, etc.

This code would be in the ASPX page to create the dataset and datatables, and then bind them to the report.
            Dim mainDataSource As New DataSet 
            Dim rptHeader As New DataTable("rptHeader"
            Dim rptDetail As New DataTable("rptDetail"
            Dim rptFooter As New DataTable("rptFooter"
            mainDataSource.Tables.Add(rptHeader) 
            mainDataSource.Tables.Add(rptDetail) 
            mainDataSource.Tables.Add(rptFooter) 
 
            Dim sampleReport As New MySampleReport 
            sampleReport.DataSource = mainDataSource 
 

So is there a way in the report to bind a specific section to a table out of the dataset?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 09 Apr 2009, 01:49 PM
Hi mkasuboski,

The DataSource can be set only once directly to the report and is applicable for the whole report (all sections). For your scenario you might take advantage of the subreport and table report items.

Kind regards,
Steve
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
mkasuboski
Top achievements
Rank 1
Answers by
Steve
Telerik team
Share this question
or