mfa Posted July 5, 2007 Share Posted July 5, 2007 Hi masterSir I success to create to p6df file and call mfa.jasper file in this codeJasperViewer.viewReport(jasperPrint,false); See my full code for calling mfa.jasper and createin pdf Connection conn = null ; Statement msqlStatement = null ; ResultSet mrs = null ; Connection mconn = null ; try { String mfat = accbalDataProvider.getCachedRowSet().getDataSourceName(); javax.naming.Context mctx = new javax.naming.InitialContext() ; DataSource mds = (DataSource)mctx.lookup(mfat); Connection mcon= mds.getConnection(); mcon.setAutoCommit(false) ; JasperPrint jasperPrint = JasperManager.fillReport("C:/Mfa.jasper",null,mcon); JasperManager.printReportToPdfFile(jasperPrint, "c:/fahimaami.pdf"); } catch (Exception ex) { log(" Error Description" , ex); error("Error counting rows: " + ex.getMessage() ); error("Error counting rows: " + ex ); } sir my first question 1. I create the pdf file but not show how I show pdf file Question no. 2 . sir this code calling mfa.jasper and createin pdf only in sever not show mfa.jasper in client side i call this page in inter net or office network or local networkI use this link http://fahim:29080/WebApplication15/ that link run my page when I press button then page create the c:/fahimaami.pdf in server c: drive not create client c: drive or create server side not create client side and open JasperViewer.viewReport(jasperPrint,false); file in server side not onpen mfa.jasper file in client side please give me idea how I open mfa.jasper in client side or client computer thank’s aamir 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