Hide textbox when printing

2 posts, 0 answers
  1. Sascha
    Sascha avatar
    4 posts
    Member since:
    Dec 2018

    Posted 20 Dec 2018 Link to this post

    I created a report containing a textbox that acts as a button for interactivity purposes.

    This button - for sure - must not appear when I print the report nor in the print preview mode.

    How can I achieve this?

    I saw similar threads like this one:

    https://www.telerik.com/forums/hide-certain-elements-when-printing 

    But there was no real solution for the problem from Telerik. Anything changed now?

     

    Thanks,

    Sascha

  2. Ivan Hristov
    Admin
    Ivan Hristov avatar
    183 posts

    Posted 28 Dec 2018 Link to this post

    Hello Sascha,

    This functionality is available since R2 2018 SP1 release of our product. We introduced the RenderingFormat expression under Global Objects in the Expression editor of the report designers and it can be used in expressions. In the current scenario, the textbox visibility can be controlled via Conditional Formatting rule that compares the RenderingFormat.Name with an array of values, representing the PrintPreview and Print rendering extensions. In this case the rule would have "= RenderingFormat.Name" as Expression, "In" as Operator and "= Array('IMAGEPrintPreview', 'IMAGEPrint')" as Value.

    I have also attached a sample .trdx report to demonstrate the suggested approach. I hope you will find it useful, but if you have further questions, please let us know.

    Regards,
    Ivan Hristov
    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