Jump to content
We've recently updated our Privacy Statement, available here ×
  • This documentation is an older version of JasperReports Server Visualize.js Guide. View the latest documentation.

    Many reports include hyperlinks (URLs) that link to websites or other reports. The report function gives you access to the links generated in the report, so that you can customize both the appearance and the container where they are displayed.

    This chapter contains the following sections:

    Customizing Links
    Drill-Down in Separate Containers
    Accessing Data In Links

    Customizing Links

    You can customize the appearance of link elements in a generated report in two ways:

    The linkOptionsexposes the beforeRender event to which you can add a listener that has access to the links in the document as element pairs.
    The normal click event lets your add a listener that has access to a link when it is clicked.

    Drill-Down in Separate Containers

    By using the method of listing for clicks on hyperlinks, you can write a visualize.js script that sets the destination of drill-down report links to another container. This way, you can create display layouts or overlays for viewing drill-down links embedded in your reports.

    Associated HTML:

    Associated CSS:

    Accessing Data In Links

    In this example, we access the hyperlinks through the data.links structure after the report has successfully rendered. From this structure, we can read the tooltips that were set in the JRXML of the report. The script uses the information in the tooltips of all links in the report to create a drop-down selector of city name options.

    By using link tooltips, your JRXML can create reports that pass runtime information to the display logic in your JavaScripts.

    Associated HTML:

    Associated CSS:


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...