Get report ItemCollection and change their value

2 posts, 0 answers
    1 posts
    Member since:
    Dec 2017

    Posted 26 Mar 2019 Link to this post


    We have a Win Forms project with a Telerik Report and at the same project we have a Form where we added the report viewer. What we want to do is to get the item collection of the Report to our main Form and change their values before we display the report at the viewer.

    Thanks in advance for your time.


  2. Silviya
    Silviya avatar
    422 posts

    Posted 29 Mar 2019 Link to this post

    Hello Christodoulos,

    To alter dynamically report item properties, our recommendation is to use Conditional Formatting and Bindings. This approach allows achieving different layout of the report based on its data and report parameters, with all the necessary logic applied in the report definition through Expressions that are evaluated at run time.

    We do not recommend changing the report definition run time. Still, in case, you need to modify the report at runtime (prior to displaying it in a viewer), you can instantiate and modify the report prior to setting the viewer's ReportSource and wrap it in an InstanceReportSource. For example in the Form_Load event. This approach is demonstrated in the How to: Bind to a DataSet article - check Form5_Load event handler. You can access the report items as explained here: Access Report Items Programmatically.

    To be able to modify a TRDP report, you need to unpackage it first.

    Best Regards,
    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