Jump to content
Changes to the Jaspersoft community edition download ×

How to edit element style so that margin-left is 0 not auto?


fibrecrm

Recommended Posts

Hi

I 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=true

Any help would be very much appreciated ! :)

  2014-11-10_17-31-56.png.6196e46bc7f025b43b6b82630243b22e.png

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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 browser

Is 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

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

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

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