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

Serialized Report

1 Answer 96 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Darren
Top achievements
Rank 1
Darren asked on 27 Jan 2012, 06:01 PM
I wrote some code to create a report in a wizard like fashion.   Something changed in the architecture of the system and now I need to support a dynamic connection to a datasource.  In other words I don't know what database I'm connecting to at design time.  The only thing I can think of to do is to inherit the Report object into a new class that supports my dynamic connection and then serialize the whole thing.  I can't think of any other way to do it.  Any other ideas?  Is there a way to iterate the SqlDataSources in a report?

Thanks,
Darren

1 Answer, 1 is accepted

Sort by
0
Elian
Telerik team
answered on 31 Jan 2012, 12:14 PM
Hello Darren,

You cannot iterate through the SqlDataSource but you can use DataTable and DataAdapter to get the data and then you will be able to loop over it. 
Here are a couple of forum threads discussing dynamic table creation:
The easiest way to learn how to dynamically build a report would be to create one in the Designer (with all the specification that you might possibly need) and then examine the code generated in the InitializeComponent() method (inside the Report.Designer.cs file). 

Greetings,
Elian
the Telerik team

Q3’11 of Telerik Reporting is available for download. Register for the What's New in Data Tools webinar to see what's new and get a chance to WIN A FREE LICENSE!

Tags
General Discussions
Asked by
Darren
Top achievements
Rank 1
Answers by
Elian
Telerik team
Share this question
or