fibrecrm Posted November 10, 2014 Share Posted November 10, 2014 HiI have a URL which runs a chart report and this url runs within an iFrame inside another app. However the iframe width is narrow and the chart output thinks the window is the width of the browser. Therefore the chart appears off to the right and does not sit nicely within the iFrame. I can edit in FireBug the "Margin-left: auto" changing auto to be 0 and it is then ok however I cannot find where to do this in the report. the URL is something like this:https://jasperserver/flow.html?_flowId=viewReportFlow&standAlone=true&_flowId=viewReportFlow&ParentFolderUri=%2Freports%2Fmyrep&reportUnit=%2Freports%2Fmyrep%2Fperformance&output=html&j_username=myname&j_password=maypass&viewAsDashboardFrame=trueAny help would be very much appreciated ! :) Link to comment Share on other sites More sharing options...
hozawa Posted November 10, 2014 Share Posted November 10, 2014 Not sure what you're doing. Do you have a chart on JasperReports Server and a web page with iframe displaying it?>iframe width is narrow and the chart output thinks the window is the width of the browserIs you question about how to setting css on iframe tag? How is the report showing up on JasperReports Server? It is right aligned?Have you tried to decrease the size of your report with a chart on it? Link to comment Share on other sites More sharing options...
fibrecrm Posted November 10, 2014 Author Share Posted November 10, 2014 Hey thanks for helping here. To answer you questions, yes, I have a chart running on jasperserver 5.6 and a browser based CRM app which has a home page dashboard that shows this chart in an iFrame. The iFrame component of the dashboard is about 30% of the width of the browser. This results in only half of the chart showing. a horizonal scroll bar is added to the iframe so you can scrool to see the chart.What I am asking is how do I remove or set the left margin or align the chart to the left. The chart in iReports has no margins set and the chart takes up nearly 100% of the width and height. It appears that the html output adds massive margins to the left and right. I've tried making the chart tiny and it just becomes a tiny chart in the same width Link to comment Share on other sites More sharing options...
hozawa Posted November 11, 2014 Share Posted November 11, 2014 If you are using the commercial version, you'll be able to use Visualize.js to insert a chart into a <div> in your page.It's the problem with JasperReports Server centering the reports, right? Link to comment Share on other sites More sharing options...
fibrecrm Posted November 11, 2014 Author Share Posted November 11, 2014 I am using the Community Edition. Would you know if this can be changed in this version? Centering is the problem for this report, yes. Link to comment Share on other sites More sharing options...
fibrecrm Posted November 11, 2014 Author Share Posted November 11, 2014 I am using Community Edition and yex, the problem is with the centering of the report (it does not centre relative to the iframe. It centres the report based on the screen resolution. Link to comment Share on other sites More sharing options...
fibrecrm Posted November 11, 2014 Author Share Posted November 11, 2014 On further investigation in FireBug the issue appears to be in the theme.css where the body tag contains:body { min-width:1020px; position:relative;If I comment out min-width: 1020px my output is perfect.I have edited the jasperserver/themes/default/theme.css and restarted the service but it still shows the above value in Firebug and nothing is different.I cannot find another theme.css file on the server.....at a loss what to do now :( Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now