/JasperViewerFx

A Jasper Report Viewer for JavaFx

Primary LanguageJavaGNU General Public License v2.0GPL-2.0

JasperViewerFx

screen

JasperViewrFx is a full featured Jasper report viewer written completely in JavaFx. It has the following features:

  • View and zoom all of the pages of a Jasper report document.
  • Export report documents to the following formats: PDF, PNG, DOCX, XLSX, HTML
  • Print reports using the system dialog.

Originally this project has been forked from mgrecol/JasperViewerFx and I decided to improve it by code cleaning, refactoring, simplifying and small GUI redesigning.

How to use:

JasperViewerFx is made to be included in a running JavaFxApplication. This means that a running JavaFx application would already have have a stage created. What you need to integrate this feature into your project is just put jar into your classpath, after that:

JRViewer jrViewer = new JRViewer();
Stage viewerStage = jrViewer.getViewerStage(jasperPrint);
viewerStage.show();

Additionally you can pass supported language parameter, scene size and export filetypes which you need:

JRViewer jrViewer = new JRViewer(
    JRViewerSupportedLocale.EN,
    640, 420,
    Arrays.asList(
        JRViewerFileExportExtention.PDF,
        JRViewerFileExportExtention.DOCX
    )
);