On close event for web designer preview

Posted by: ewan.johnstone on 18 July 2023, 9:54 pm EST

    • Post Options:
    • Link

    Posted 18 July 2023, 9:54 pm EST

    Hi,

    I’m currently using ar-designer and ar-viewer 17.0.0

    Two related questions about the web designer:

    1. Is there a way of closing the preview viewer via the api?
    2. Is there a way of triggering an action after the preview has been closed?

    I cannot find any such methods via the api documentation but perhaps it is labelled in a non-obvious way.

  • Posted 19 July 2023, 9:04 pm EST

    Hi Ewan,

    Although there’s no direct way to close the viewer via the API. However, you can access the back button of the viewer using its id and simulate a report click for example ‘document.getElementById(‘viewer-container-button-back’).click()’.

    This will close the report preview via code.

    Please find attached a sample implementing the same.

    Unfortunately, there’s no way of triggering an action after the preview has been using the UI, but if you are closing the viewer through code you may trigger your desired function after closing the report preview.

    Regards,

    Anand

    WebDesigner_MVC.zip

Need extra support?

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

Learn More

Forum Channels