Jump to content
  • How to force a click on report reload using HTTP component?


    stchan
    • Version: v7.5.0 Product: JasperReports® Server

    Issue Description:

    The reload button ("refresh report with latest data") is present at the top menu of the report. Trying to force a click from JavaScript as an HTTP component in the report, but doesn't work as expected when the button is clicked.

    Used the following event in coding,

    document.getElementById('dataRefreshButton').click();

     


    Resolution:

    In this case we are using 'mouseup' event instead of 'click' event, something like:

    var mouseupEvent = new Event('mouseup');
    
    document.getElementById('dataRefreshButton').dispatchEvent(mouseupEvent);

     


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...