How to scale/zoom report embedded through visualize.js

0

I have a report embedded in a web page bit it has a fixed width of 575px, and the text is too small to see clearly. I thought an embedded report would resize itself into it's container. Is this dependent on how the report is designed?

The rendered size does seem to match the 100% size shown if I run the same report in Jasper Reports Server, but does the javascript API offer any control over the zoom?

I have fudged it by adjusting the transform scale property of the jrPage table after the report completes, and this works to a point but:

a) if the page is resized the report renders back to 100% - AFTER any code I attach to the window resize event.

b) interactivity is compromised while the scaled report is shown - eg. if I try to resize a column it shows the original width not the scaled width.

 

jeremy.bradshaw_1's picture
Joined: Jul 3 2015 - 3:58am
Last seen: 3 years 5 months ago

2 Answers:

2

JSFiddle examples below may help you:

Disable autoresize and resize report manually - http://jsfiddle.net/6c8mu5my/15/

Fit report to container - http://jsfiddle.net/NesterOne/7ChRr/
You may need to change URL in the second example.

asimkin's picture
6343
Joined: Jun 16 2014 - 6:30am
Last seen: 2 days 10 hours ago
0

Visualize.js just renders the report in the <div>. You can use jQuery UI to change the effects.

hozawa's picture
45109
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 month 1 week ago
Feedback
randomness