Disable print button for report until report finishes loading

Posted by: mercuryc on 28 September 2017, 7:14 pm EST

    • Post Options:
    • Link

    Posted 28 September 2017, 7:14 pm EST

    [activereports_archive]Hi, we have developed over a hundred reports but we are in need of disabling the print button until all pages of a report are loaded as if a user click’s print prior to the report being loaded, only a certain number of pages are fed to the printer. Can this be done programatically using c# via code behind or javascript?[/activereports_archive]

  • Posted 28 September 2017, 7:14 pm EST

    [activereports_archive]Hello,



    Is it a windows application or web application / website. If it is a web application / website then please let me know which viewertype you are using so that I can provide you the relevant code for achieving that.



    Regards,

    Subodh

    [/activereports_archive]

  • Posted 28 September 2017, 7:14 pm EST

    [activereports_archive]We are using a web application which



    has the following version information in our web.config



    ActiveReports6, Version=6.1.2577.0, Culture=neutral, PublicKeyToken=CC4967777C49A3FF[/activereports_archive]

  • Posted 28 September 2017, 7:14 pm EST

    [activereports_archive]We are using the activex control which is causing the issue. [/activereports_archive]

  • Posted 28 September 2017, 7:14 pm EST

    [activereports_archive]We have discovered a workaround using the following javascript function to show the previously hidden print button.















    [/activereports_archive]

  • Posted 28 September 2017, 7:14 pm EST

    [activereports_archive]Hello,



    It seems that the javascript code was not posted. Can you please copy it into a text file and then upload it with your post?

    Also let us know the ViewerType for the WebViewer of ActiveReports6 you are using in the web application.[/activereports_archive]

  • Posted 8 May 2022, 4:22 pm EST

    I know this thread is very very old. But I’m new to grapecity and just learning. I too needed to disable the print button for specific reports. After lots of searching I finally found a quick and easy way to do it. Just add this code to your form load: vwrPreviewReport.Toolbar.ToolStrip.Items.RemoveAt(2); Reference this page to know what the index number is for the toolstrip control you would like to remove: https://www.grapecity.com/activereportsnet/docs/latest/online/windows-forms-viewer-customization.html

  • Posted 9 May 2022, 2:28 am EST

    Hi Shannon,

    Thanks for the solution. It will help others doing something similar in the future.

    Regards,

    Akshay

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels