All Projects → gbfragoso → JasperViewerFX

gbfragoso / JasperViewerFX

Licence: other
The JasperViewerFX is a free JavaFX library which aims to avoid use of JasperReport's swing viewer

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to JasperViewerFX

MaskedTextField
MaskedTextField is an component similar to JFormmatedText field and can be used in same way.
Stars: ✭ 21 (-22.22%)
Mutual labels:  javafx, javafx-library, javafx-8
lib-preferences
Lib-Preferences is a library for easy storing simple data to a Preferences.properties file in a Java(FX) & Maven desktop application.
Stars: ✭ 12 (-55.56%)
Mutual labels:  javafx, javafx-library, javafx-8
Awesomejavafx
A curated list of awesome JavaFX libraries, books, frameworks, etc...
Stars: ✭ 2,488 (+9114.81%)
Mutual labels:  javafx, javafx-library
GNCarousel
Carousel based on web design
Stars: ✭ 19 (-29.63%)
Mutual labels:  javafx, javafx-8
Bank-Account-Simulation
A Bank Account Simulation with JavaFX and SQLite back-end. Material UX|UI.
Stars: ✭ 19 (-29.63%)
Mutual labels:  javafx, javafx-library
DashboardFx
JavaFx Dashboard
Stars: ✭ 272 (+907.41%)
Mutual labels:  javafx, javafx-library
JasperReportsBoot
JasperReports font extensions and Spring Boot Sample
Stars: ✭ 18 (-33.33%)
Mutual labels:  jasperreports, pdf-generation
JFXGoogleDrive
A JavaFX Google Drive Client (For Demonstration Purposes Only).
Stars: ✭ 29 (+7.41%)
Mutual labels:  javafx, javafx-8
advanced-bindings
Collection of Binding helpers for JavaFX(8)
Stars: ✭ 63 (+133.33%)
Mutual labels:  javafx, javafx-library
elasticsearch-report-engine
An Elasticsearch plugin to return query results as either PDF,HTML or CSV.
Stars: ✭ 49 (+81.48%)
Mutual labels:  jasperreports, pdf-generation
medusa
A JavaFX library for Gauges
Stars: ✭ 605 (+2140.74%)
Mutual labels:  javafx, javafx-library
animated
🌊 Implicit animations for JavaFX.
Stars: ✭ 79 (+192.59%)
Mutual labels:  javafx, javafx-library
Grid
A grid component for javafx
Stars: ✭ 23 (-14.81%)
Mutual labels:  javafx, javafx-library
FluxFX
Flux architecture with JavaFX
Stars: ✭ 24 (-11.11%)
Mutual labels:  javafx, javafx-library
StockManager
a JavaFX stock manager app
Stars: ✭ 29 (+7.41%)
Mutual labels:  javafx, jasperreports
pdftron-android-samples
PDFTron Android Samples
Stars: ✭ 30 (+11.11%)
Mutual labels:  pdf-viewer, pdf-generation
spring-javafx-material-design-admin
Aplicação desktop para Gerenciamento de estoque e vendas com Spring Boot, JavaFX e Material Design
Stars: ✭ 56 (+107.41%)
Mutual labels:  javafx, jasperreports
mano-simulator
🖥️ An assembler and hardware simulator for the Mano Basic Computer, a 16 bit computer.
Stars: ✭ 20 (-25.93%)
Mutual labels:  javafx, javafx-8
pdf-viewer
PDFjs with flipbook integration (using turnjs4)
Stars: ✭ 85 (+214.81%)
Mutual labels:  pdf-viewer
octillect
An Intellectual Octopus for managing your tasks and projects.
Stars: ✭ 14 (-48.15%)
Mutual labels:  javafx

JasperViewerFX

The JasperViewerFX aims to avoid usage of default Swing JasperReport's viewer. This viewer use SwingFXUtils to render only one page at time and append the output image to an ImageView.

Viewer image

Limitations

JasperReports draw engine relies on awt graphics, drawing each element on a Graphics2D canvas. The JavaFX's GraphicsContext is incompatible with Graphics2D so, even translating the drawing methods, we have memory leaks in some situations. The ImageView method has better overall performance and doesn't cause memory problems, but prevent user to click links and the zoom quality decrease when scaling images.

Features

  • Exporting for PDF, HTML, XML (Without images), XLS, XLSX;
  • Zoom in / Zoom Out;
  • Interface completely written in JavaFX;
  • Current page property.

Dependencies

<dependencies>
	<dependency>
		<groupId>net.sf.jasperreports</groupId>
		<artifactId>jasperreports</artifactId>
		<version>6.13.0</version>
	</dependency>
</dependencies>

Minimal Setup

  • Tested with: jasperreports-6.0.0.jar (or above) and Java 8

Older versions

In older versions of this project the JasperPrint's generation method has been abstracted. We decided to focus on just viewing the report and let the user decide how to generate it.

How to use

Example with JDBC connection

try {
	Connection con = new ConnectionManager().getConnection();
	JasperReport jreport = (JasperReport) JRLoader.loadObject(getClass().getResource("your_resource_path"));
	JasperPrint jprint = JasperFillManager.fillReport(jreport, null, con);
	new JasperViewerFX(primaryStage).viewReport("Simple report", jprint);
	con.close();
} catch (JRException | SQLException e) {
	e.printStackTrace();
}

Example with JRBeanCollectionDataSource

try {
	JRBeanCollectionDataSource source = new JRBeanCollectionDataSource(collection);
	JasperReport jreport = (JasperReport) JRLoader.loadObject(getClass().getResource("your_resource_path"));
	JasperPrint jprint = JasperFillManager.fillReport(jreport, null, source);
	new JasperViewerFX().viewReport("JRBeanCollectionDataSource example", jprint);
} catch (JRException e) {
	e.printStackTrace();
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].