Jump to content

Is there any way to add iFrames to the HTML output


phantastes

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

I hear that this can be done using a Generic Element as per this thread in the iReport forum.

Would anyone know how this could be achieved? I guess I would need to create multiple html files that the the main html could reference in the iFrame tags. Any thoughts on how much work this would be?

Thank you!

Magnus

 

 

Link to comment
Share on other sites

  • 2 weeks later...

I solved this by restyling the XHTML output using jQuery. The short short version:

1. Put your subreport in a frame. Set the net.sf.jasperreports.export.html.id property for the frame.

2. Restyle the document using:     

     var boxHeight = 350;

     $("#theFrameID").css('overflow','hidden');
     $("#theFrameID").css('overflow-y','scroll');
     $("#theFrameID").css('height',boxHeight+'px');

That's it.

Of course your specific implementation of JasperReports will need to be setup to add the javascript to your xhtml output. You will also need the jQuery library.

All the best,

Magnus

 

 

 

 

 

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