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

Updating Table Data Source at Runtime

1 Answer 156 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 20 Aug 2015, 02:27 PM

Hello, 

I have created a report which contains a Telerik.Reporting.Table object. In the designer, I set the data source of this Table object to an SQLDataSource object. At runtime, I want to retrieve some details about this data source, such as the ConnectionString or the SelectCommand used in the data source, however, when I look at the Table object in code at runtime, the data source is coming in as {Table1} instead of as an SQLDataSource, and the {Table1} data source has none of the details which I need. 

I have referred to the code at this URL: Changing the connection string dynamically

which seems to imply that the Table data source can come in as an SQLDataSource  (see the section near the end commented as "Covers all data items". However when I run this code to attempt to set  the connection string for a Table, it doesn't work because the data source isn't SQLDataSource at runtime. Has something changed since this example was posted? 

Thank you very much! 
Keith

 

1 Answer, 1 is accepted

Sort by
0
Keith
Top achievements
Rank 1
answered on 20 Aug 2015, 04:10 PM
I was able to work around this by using a crosstab in my report instead of a Table. 
Tags
General Discussions
Asked by
Keith
Top achievements
Rank 1
Answers by
Keith
Top achievements
Rank 1
Share this question
or