How can I set the DataSource at runtime?

4 posts, 2 answers
  1. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 12 Sep Link to this post

    I have a TRDP or TRDX that I have resolved at runtime.

    These TRDP and TRDX objects don't expose anything except parameters.  Not sure why this is.

    How can I set the DataSource at runtime?

    (please don't ask why I want to do it, I just need to, thank you)

     

    Karl

     

     

     

  2. Answer
    Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 16 Sep Link to this post

    Hello Karl,

    If the requirement is to fetch the data at run-time, the TRDP(TRDX) report need to be unpackaged(deserialized) to get the report instance. ReportPackager will return a deserialized instance of a report (Telerik.Reporting.Report object) that you can change through the provided API and finally, return the new object wrapped in InstanceRepotSource

    Best Regards,
    Silviya
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Karl
    Karl avatar
    20 posts
    Member since:
    Aug 2019

    Posted 16 Sep in reply to Silviya Link to this post

    Thank you for the response.

    Question, why use InstanceReportSource?  Docs say this is legacy.  Legacy implies will be obsolete in the future.

    Karl

     

  4. Answer
    Silviya
    Admin
    Silviya avatar
    414 posts

    Posted 17 Sep Link to this post

    Hello Karl,

    Indeed, generally, we do not recommend to use InstanceReportSource, but it will not become obsolete as it is a necessary solution in some cases. It is the ReportSource that can pass an instance of a report definition to the Reporting engine. For example, when it is required to modify the report definition dynamically and this cannot be done with Expressions, Bindings or the other tools we provide and recommend for this purpose.

    Let us know if you have any additional questions.

    Best Regards,
    Silviya
    Progress Telerik

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top