JSFiddle - React, Tailwind, and code Playground

by Kishoreajey

HTML

<script src="http://jaspersoft.healthcareit.net/jasperserver-pro/client/visualize.js"></script>
 
<button>Reset params</button>
<br/><br/>
 
<div id="container"></div>

JavaScript

function handleError(e) {
    alert(e);
}
 
visualize({
    auth: {
      name: "jasperadmin",
      password: "jasperadmin"
    }
}, function (v) {
    var dashboard = v.dashboard({
        resource: "/public/Samples/Dashboards/1._Supermart_Dashboard",
        error: handleError,
        container: "#container",
        params: {
            Store_Country: ["Mexico"],
        }
    });
 
    $("button").click(function() {
        dashboard.params({}).run();
    });
});