Jump to content
We've recently updated our Privacy Statement, available here ×
  • Visualize.js: How to discover Resource types and Search types available in JasperReports Server repository


    stasp
    • Version: v7.1, v7.1.0, v6.4, v6.4.3, v6.4.2, v6.4.0 Product: JasperReports® Server

    Code sample

    In order to list the available resource and search types you can run something as simple as this:

    visualize({
      auth: {
        name: "joeuser",
        password: "joeuser",
        organization: "organization_1"
      }
    }, function(v) {
      console.log(v.resourcesSearch.types);
      console.log(v.resourcesSearch.sortBy);
    });

    Having these lists is helpful when you need to find specific resource types in repository and/or sort resources in a specific way, and you are not sure what are the values to provide for the search query

     

    Below is an example code snippet in JSFiddle.net for discovering available resource types and search types available in JasperReports Server repository, logging it in browser console, and also creating corresponding dropdown lists on the UI:

    https://jsfiddle.net/Stas_P/zxdhcu9e/

    Related articles

    Visualize.js: Search for Dashboards, Reports and other resources in repository folder and its subfolders


    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...