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

Report Data Source

1 Answer 108 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Jacques
Top achievements
Rank 1
Jacques asked on 05 Mar 2015, 04:56 PM
I'm implemented a feature in which I need to change the data source of a report at run time. I've found the report object has a datasource property which I could change but what happens in the case of a report with multiple data sources?

Also I've found a workaround by modifying the report definition XML on the fly but since I'm not sure if this is the correct way of doing it. I would rather have an object model that allows me to do this. Perhaps with your report definition schema.(xsd) I could deserialize it back into an object and then manipulate it but I haven't found any place where you expose the xsd.

I'm using Q2 2014.

Thank you

1 Answer, 1 is accepted

Sort by
0
Stef
Telerik team
answered on 10 Mar 2015, 11:44 AM
Hello Jacques,

To change the data sources, you need to access the corresponding data item and its DataSource property. Then you will be able to convert it to the type of used data source component and change its properties, or assign the DataSource property directly to a data object.

Consider the example in Changing the connection string dynamically according to runtime data.


I hope the provided 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.

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