Report Data Source

2 posts, 0 answers
  1. Jacques
    Jacques avatar
    1 posts
    Member since:
    Aug 2014

    Posted 05 Mar 2015 Link to this post

    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

  2. Stef
    Admin
    Stef avatar
    3610 posts

    Posted 10 Mar 2015 Link to this post

    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.

     
Back to Top