Where can I find an example of an html page that loads a report outside jsfiddle?

0

I have tryed the examples in jsfiddle and it works. Now I want to create a page on my web site that shows the report without using jsfiddle. Is that possible?

Thanks and regards,

Miguel

Miguel.Rodriguez_1's picture
Joined: Oct 23 2014 - 2:38pm
Last seen: 5 years 2 weeks ago

1 Answer:

0

Here you go. You may need to fix up some js load links.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Visualize.js Sample</title>
<script src="js/jquery.js"></script>
<script type="text/javascript" src="http://127.0.0.1:8080/jasperserver-pro/client/visualize.js"></script>
<script type="text/javascript">
visualize({
    auth: {
        name: "superuser",
        password: "superuser"
    }
}, function (v) {
    v("#container").report({
        resource: "/public/Samples/Reports/TopCompanies",
        error: handleError
    });
    function handleError(err){
        alert(err.message);
    }
});
</script>
</head>
 
<body>
    <div id="container"></div>
</body>
</html
hozawa's picture
53202
Joined: Apr 24 2010 - 4:31pm
Last seen: 5 months 1 week ago
Feedback