JasperReports viewer

A discussion forum for FXGraphics2D (adds a Java2D API to the JavaFX Canvas).
Locked
Werner Lehmann
Posts: 3
Joined: Mon Dec 01, 2014 9:51 pm
antibot: No, of course not.

JasperReports viewer

Post by Werner Lehmann » Mon Dec 01, 2014 9:55 pm

I am thinking about using FXGraphics2D in order to show Jasper reports. Except for exporting to PDF (using a PDF viewer) the tyical option here is to use the Swing based JRViewer component included with the Jasper library. Internally it renders using either an image or graphics2d. I need to run a few tests but in theory this might be workable. If somebody knows in practice I'd like to hear about it :) Otherwise I'll post my findings if/when I get to this. Thx.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: JasperReports viewer

Post by david.gilbert » Tue Dec 02, 2014 12:25 am

That sounds great. I don't know the internals of the Jasper Reports viewer component, but if it uses the Graphics2D class for rendering then there shouldn't be any major technical hurdles (although I guess perhaps there might be some subtle font handling issues, since precise text layout is pretty important for a reporting library). I'm looking forward to hearing how it goes and if you have any questions I'll do my best to help.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Werner Lehmann
Posts: 3
Joined: Mon Dec 01, 2014 9:51 pm
antibot: No, of course not.

Re: JasperReports viewer

Post by Werner Lehmann » Tue Dec 02, 2014 2:01 pm

Yes, fonts worry me the most (along with two TODOs left in your code ;-) At any rate I have a proof-of-concept now, takes just a few lines of code because Jasper can already export to graphics2d - that's what it uses anyway for its own swing jrviewer component. Different fonts worked well so far, also tested transparency / opacity.

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: JasperReports viewer

Post by david.gilbert » Wed Dec 03, 2014 10:46 pm

Sounds great. The TODOs shouldn't give you much trouble, and I have some code that I will get committed soon that removes them anyway (for the 1.2 release).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Werner Lehmann
Posts: 3
Joined: Mon Dec 01, 2014 9:51 pm
antibot: No, of course not.

Re: JasperReports viewer

Post by Werner Lehmann » Tue Dec 09, 2014 7:22 pm

Hi David,

here's some feedback. Thanks to your work it was more or less simple to create this JasperReports viewer with JavaFX. It was actually quite fun to do. So far I had not a single issue with FXGraphics2D and performance is quite good. Of course there was not much testing. I might be able to open-source this thing at a later time. Until then I can share a screenshot if you are interested. I am not posting it here though because of possible legal issues.

So thanks again, without this I'd be stuck with SwingNode :)

Werner

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: JasperReports viewer

Post by david.gilbert » Sun Dec 14, 2014 6:45 pm

Great! It would be super cool if you could get some or all of your JasperReports viewer code into open source.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked