jkeri Posted July 10, 2017 Share Posted July 10, 2017 I have a client who wants to run compiled jasper report, not from a Jasper reports server, but instead from a Java GUI application that they can write in-house. Does anyone know a website or other resourse where I can further explore this option? Link to comment Share on other sites More sharing options...
reportdev Posted July 10, 2017 Share Posted July 10, 2017 Using the jasper api, a java class can be written with a datasource.Below imports would help.import net.sf.jasperreports.engine.JasperCompileManager;import net.sf.jasperreports.engine.JasperFillManager;import net.sf.jasperreports.engine.JasperPrint;import net.sf.jasperreports.view.JasperViewer;import java.sql.Connection;import java.sql.DriverManager; Check this page.http://www.programcreek.com/java-api-examples/index.php?api=net.sf.jasperreports.engine.JasperFillManagerIn order to access this class, you might have to write the code for a html page. Link to comment Share on other sites More sharing options...
hozawa Posted July 11, 2017 Share Posted July 11, 2017 There's an article that has code to compile and build Java JasperReports application.http://zetcode.com/articles/jasperviewer/ Link to comment Share on other sites More sharing options...
fabricerd Posted July 21, 2017 Share Posted July 21, 2017 Hi you can also try jasperstarteryou can launch a jaspereport () from command line to view print or export the data source defined in a conf file and you can also pass parameters to your report https://sourceforge.net/projects/jasperstarter/For example My report is launched by command line"F:Program Files (x86)JasperStarterbinjasperstarter.exe" pr "F:Program Files (x86)JasperStarterbindocsage.jasper" -f view @"F:Program Files (x86)JasperStarterbinsagebijou.conf" -P dopiece=%1 -aFor example my sagebijou.conf file content-tgeneric--db-drivernet.sourceforge.jtds.jdbc.Driver--db-urljdbc:jtds:sqlserver://localhost:1435/BIJOU-uUsername-pPassword Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now