Jump to content
Changes to the Jaspersoft community edition download ×

Visualize js in plain HTML


kalyan.kkannan

Recommended Posts

I want to render visualize js inside plain HTML, getting below error. Kindly help me to resolve the same.

Uncaught SyntaxError: Invalid regular expression: /[À-ß][€-¿]|[à -ï][€-¿]{2}|[ð-÷][€-¿]{3}/: Range out of order in character class
visualize.html:11 Uncaught ReferenceError: visualize is not defined
 
My Code
 
<html>
<head>
<script src="http://127.0.0.1:8080/jasperserver-pro/client/visualize.js"></script>
 
</head>
<body>
<div id="reportContainer">Loading..</div>
<script>
 
 
visualize({
    server: "http://127.0.0.1:8080/jasperserver-pro",
    auth: {
        name: "jasperadmin",
        password: "jasperadmin"
        
    }
}, function (v) {
    v.report({
        resource: "/public/chart",
        container: "#reportContainer",
        defaultJiveUi: { enabled: false },
        error: function (err) {
            alert(err.message);
        }
    });
});
 
</script>
 
</body>
</html>

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Seems like visualize.js script file is not being loaded. First, you are using Commercial version of JasperReport Server aren't you? Visualize.js is not supported in community version.

Try if you can access it by just entering the following from your web browser.

http://127.0.0.1:8080/jasperserver-pro/client/visualize.js

Try deleting the following:

server: "http://127.0.0.1:8080/jasperserver-pro",

Link to comment
Share on other sites

Please refer to the following:

<html>

<head>

<script src="http://127.0.0.1:8080/jasperserver-pro/client/visualize.js?_opt=false"></script>

</head>

<body>

<div id="reportContainer">Loading..</div>

 

<script>

visualize({

//server: "http://127.0.0.1:8080/jasperserver-pro",

auth: {

name: "jasperadmin",

password: "jasperadmin",

organization: "organization_1" }

 

}, function (v) {

v("#reportContainer").report({

resource: "/public/Samples/Reports/01._Geographic_Results_by_Segment_Report", defaultJiveUi: { enabled: false },

error: handleError });

 

function handleError(err){

alert(err.message);

} });

</script>

</body>

</html>

============================

jsfiddle: http://jsfiddle.net/zwr2ohtz/

Link to comment
Share on other sites

On browser when hitting http://127.0.0.1:8080/jasperserver-pro/client/visualize.js, i am able to see the visualize.js getting downloaded.

I simply used the above code but getting the below error.

 

Uncaught TypeError: Cannot read property '2' of nullvisualize.js?_opt=false:9780 getLocationvisualize.js?_opt=false:10095 prepareTransportStackvisualize.js?_opt=false:10823 easyXDM.Rpcvisualize.js?_opt=false:12362 makeRpcvisualize.js?_opt=false:12515 (anonymous function)visualize.js?_opt=false:16059 (anonymous function)visualize.js?_opt=false:15902 jQuery.Callbacks.firevisualize.js?_opt=false:15948 jQuery.Callbacks.self.addvisualize.js?_opt=false:16058 (anonymous function)visualize.js?_opt=false:13187 jQuery.extend.eachvisualize.js?_opt=false:16055 (anonymous function)visualize.js?_opt=false:16115 jQuery.extend.Deferredvisualize.js?_opt=false:16054 jQuery.extend.Deferred.promise.thenvisualize.js?_opt=false:12514 Rootvisualize.js?_opt=false:12750 (anonymous function)visualize.js?_opt=false:1699 context.execCbvisualize.js?_opt=false:915 Module.checkvisualize.js?_opt=false:1192 Module.enablevisualize.js?_opt=false:823 Module.initvisualize.js?_opt=false:1465 (anonymous function)

Link to comment
Share on other sites

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