Direct Printing
Quote from zkiwi34 on 5. March 2026, 23:28I found this, but I'm not sure where to get the import files from
// Source - https://stackoverflow.com/q/
29734265
// Posted by Door D Uthpala, modified by community. See post 'Timeline' for change history
// Retrieved 2026-03-04, License - CC BY-SA 3.0JasperDesign jspDesign = JRXmlLoader.load(reportSource)
;
JasperReport jspReport = JasperCompileManager.compileReport(jspDesign);
JasperPrint jspPrint = JasperFillManager.fillReport(jspReport, params, datasource);
JRExporter exporter = new JRPrintServiceExporter();JasperPrintManager.
printReport(jspPrint, false); // Send to default printer? ====
I believe I have to get/download this file
jasperreports-8.2.0.jarSo I could import these files... not sure these are correct...
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;No idea where to get it, as it seems all the CE files have been blanked on jaspersoft, sourceforge, and github
I found this, but I'm not sure where to get the import files from
// Source - https://stackoverflow.com/q/
// Posted by Door D Uthpala, modified by community. See post 'Timeline' for change history
// Retrieved 2026-03-04, License - CC BY-SA 3.0
JasperDesign jspDesign = JRXmlLoader.load(reportSource)
JasperReport jspReport = JasperCompileManager.
JasperPrint jspPrint = JasperFillManager.fillReport(
JRExporter exporter = new JRPrintServiceExporter();
JasperPrintManager.
====
I believe I have to get/download this file
jasperreports-8.2.0.jar
So I could import these files... not sure these are correct...
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
No idea where to get it, as it seems all the CE files have been blanked on jaspersoft, sourceforge, and github
Quote from ThoZi on 5. March 2026, 23:45🙂 You have these already in your Jaspersoft Studio (Professional) Tool... "jasperreports-8.2.0.jar" is THE Jasperreports-Library, already integrated in Jasper Studio and/or you Jasperreports Server.
Of course, you should use the jasperreports version according to your environment (what ca be a bit difficult in the Professional environment, because they use nicely sounding higher version numbers there).
Should be clear, that for this solution you would need to run your report in an own Java Programm; that way is not usable in Jasper Studio or Jasperserver (at least not in the "Preview" or in Jasperserver without developing an own export channel).
Indeed, such a "direct printing" functionality has been added to the version 10 of Jasperserver (as far as I believe to remember having heard/read something like this).
What exactly are you planning to do?
THX+Greeetings,
Thomas
P.S: BTW, the Jasperreports Library is still Open Source, can be found here: https://github.com/Jaspersoft/jasperreports But as mentioned above, you won´t need that source code...
🙂 You have these already in your Jaspersoft Studio (Professional) Tool... "jasperreports-8.2.0.jar" is THE Jasperreports-Library, already integrated in Jasper Studio and/or you Jasperreports Server.
Of course, you should use the jasperreports version according to your environment (what ca be a bit difficult in the Professional environment, because they use nicely sounding higher version numbers there).
Should be clear, that for this solution you would need to run your report in an own Java Programm; that way is not usable in Jasper Studio or Jasperserver (at least not in the "Preview" or in Jasperserver without developing an own export channel).
Indeed, such a "direct printing" functionality has been added to the version 10 of Jasperserver (as far as I believe to remember having heard/read something like this).
What exactly are you planning to do?
THX+Greeetings,
Thomas
P.S: BTW, the Jasperreports Library is still Open Source, can be found here: https://github.com/Jaspersoft/jasperreports But as mentioned above, you won´t need that source code...
