Jump to content
We've recently updated our Privacy Statement, available here ×

mfa

Members
  • Posts

    29
  • Joined

  • Last visited

mfa's Achievements

Contributor

Contributor (5/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Sir I create pdf through this code but sir how I open this pdf Automatically Connection conn = null ; Statement msqlStatement = null ; ResultSet mrs = null ; Connection mconn = null ; try { String mfat = this.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:/ddfahimaami.pdf"); JasperExportManager.exportReportToHtmlFile(jasperPrint, "c:/ddfahimaami.html"); JasperExportManager.exportReportToHtmlFile(jasperPrint, "c:/ddfahimaami.html"); Please give me idea how I open pdf file Thank’s Aamir
  2. hi master sir i use this code for create the pdf ExternalContext econtext = getExternalContext(); InputStream stream = econtext.getResourceAsStream(PREFIX); try { JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet()); JasperPrint jasperPrint = null; jasperPrint = JasperFillManager.fillReport(stream, null, mcon); JRExporter exporter = null; HttpServletResponse response = (HttpServletResponse)econtext.getResponse(); FacesContext fcontext = FacesContext.getCurrentInstance(); exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, response.getOutputStream()); exporter.exportReport(); fcontext.responseComplete(); } catch (Exception ex) { log(" Error Description" , ex); error("Error counting rows: " + ex.getMessage() ); error("Error counting rows: " + ex ); } sir this code not give any error but also not create /display the pdf i try to find the where problem occurred i get textfiled and send some value after one by one line like is this first time try JRResultSetDataSource mcon = new JRResultSetDataSource(getSessionBean1().getChartofaccRowSet()); textField2.setValue(PREFIX); is given me right result and show /WEB-INF/reports/mfa.jasper in textfield2 second time jasperPrint = JasperFillManager.fillReport(stream, null, mcon); textField2.setValue(PREFIX); when i press button second time this time page not give me result in textfield2 and show blank it means only this line have error but what i could not foud out jasperPrint = JasperFillManager.fillReport(stream, null, mcon); use see my code and give me idea or solution of my problem thank’s aamir
  3. sir when i build my projct then output window give me error in build-impl.xml file on this line <copy file="${libs.JasperReports127.classpath.libfile.12}" todir="${build.web.dir.real}/WEB-INF/lib"/> and full error is than in output windows library-inclusion-in-archive: C:Documents and SettingsAdministratorMy DocumentsCreatorProjectsfahimjaspernbprojectbuild-impl.xml:377: Warning: Could not find file C:Documents and SettingsAdministratorMy DocumentsCreatorProjectsfahimjasper${libs.JasperReports127.classpath.libfile.12} to copy. BUILD FAILED (total time: 0 seconds) please give me idea how i remove error from build-impl.xml:377: and which file are missing thankis you aamir
  4. sir when i build my projct then output window give me error in build-impl.xml file on this line <copy file="${libs.JasperReports127.classpath.libfile.12}" todir="${build.web.dir.real}/WEB-INF/lib"/> and full error is than in output windows library-inclusion-in-archive: C:Documents and SettingsAdministratorMy DocumentsCreatorProjectsfahimjaspernbprojectbuild-impl.xml:377: Warning: Could not find file C:Documents and SettingsAdministratorMy DocumentsCreatorProjectsfahimjasper${libs.JasperReports127.classpath.libfile.12} to copy. BUILD FAILED (total time: 0 seconds) please give me idea how i remove error from build-impl.xml:377: and which file are missing thankis you aamir
  5. sir i use this code for without database report jasperPrint = JasperFillManager.fillReport(stream, new HashMap(), new JREmptyDataSource()); and comple then output window give me this error C:Documents and SettingsAdministratorMy DocumentsCreatorProjectswithoutdatasourceireportsrcwithoutdatasourceireportPage1.java:390: unreported exception net.sf.jasperreports.engine.JRException; must be caught or declared to be thrown jasperPrint = JasperFillManager.fillReport(stream, new HashMap(), new JREmptyDataSource()); 1 error C:Documents and SettingsAdministratorMy DocumentsCreatorProjectswithoutdatasourceireportnbprojectbuild-impl.xml:233: The following error occurred while executing this line: C:Documents and SettingsAdministratorMy DocumentsCreatorProjectswithoutdatasourceireportnbprojectbuild-impl.xml:122: Compile failed; see the compiler error output for details. BUILD FAILED (total time: 13 seconds) see all error and plese give me idea thank's aamir
  6. hi mster sir i tyr to create pdf with out database blank for that i use this code String reportSource = "./WEB-INF/reports/test.jasper"; String reportDest = "./reports/test.html"; ExternalContext econtext = getExternalContext(); InputStream stream = econtext.getResourceAsStream(reportSource); JasperPrint jasperPrint = null; jasperPrint = JasperFillManager.fillReport(stream, null,null); //JasperExportManager.exportReportToPdfFile(stream, "simple_report.pdf"); JRExporter exporter = null; HttpServletResponse response = (HttpServletResponse)econtext.getResponse(); FacesContext fcontext = FacesContext.getCurrentInstance(); exporter = new JRPdfExporter(); exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint); // exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,response.getOutputStream()); //exporter.exportReport(); fcontext.responseComplete(); but sir only this line give me error jasperPrint = JasperFillManager.fillReport(stream, null,null); please give me idea how i get pdf thanks' aamir
  7. hi master sir i want show the group total when i use code $F{EMPCON} this in variable that give me error sir how i chnge the field type or data type in variable i try this $F{EMPCON}.min( java.math.BigDecimal ) but this give me error please give me idea how i get group total and how i change data type thank's aamir
  8. hi mster sir i use oracle with ireport but when i use variable for group total this is my table field $F{UNICON} i check the type that give me BigDecimal i change with integer and that variable i use $V{mfatt} type is integer but when i compile that give me error it.businesslogic.ireport.gui.logpane.ProblemItem@f0f875 Cannot cast from BigDecimal to Integer Line 48, Column 23 /jasperReport/variable [1]/variableExpression[1] please give me idea how i get field fotal and how i change BigDecimal with integer and where i write code thank's aamir
  9. sir i use oracle with ireport but when i use variable for group total this is my table field $F{UNICON} i check the type that give me BigDecimal i change with integer and that variable i use $V{mfatt} type is integer but when i compile that give me error it.businesslogic.ireport.gui.logpane.ProblemItem@f0f875 Cannot cast from BigDecimal to Integer Line 48, Column 23 /jasperReport/variable [1]/variableExpression[1] please give me idea how i get field fotal and how i change BigDecimal with integer and where i write code thank's aamir
  10. hi master sir i use multy year data in table table have 3 colum year , title, amout sir how i get year wise amout total or amount group total on year colum and in last grant total plese give me idea how i get group and grant total thak's aamir
  11. hi master sir i installed ireport 1.3.3 please give me idea how i connect my oracle 10g that i alrady use with ireport 1.3.3 please give all setp thank's aamir
  12. hi master thank you for your reply sir can you send me any jsp sample code how i use inputstream in jsp button when i press button then pass data to client by inputstream please send me code thank's aamir
  13. sir i import all rlated class import com.sun.rave.web.ui.appbase.AbstractPageBean; import com.sun.rave.web.ui.component.Body; import com.sun.rave.web.ui.component.Form; import com.sun.rave.web.ui.component.Head; import com.sun.rave.web.ui.component.Html; import com.sun.rave.web.ui.component.Link; import com.sun.rave.web.ui.component.Page; import javax.faces.FacesException; import com.sun.rave.web.ui.component.Button; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import java.io.*; import javax.imageio.*; import java.awt.image.*; import java.awt.*; use this code in button press event public String button1_action() { InputStream forms = getServletContext().getResourceAsStream("/mfa.jasper"); return null; } but sir this line give me error i need send jasperviewer to client by streem sir how i use streem please send me code how i send jasperviewer to client through streem thank
  14. hi master sir i am use sun java studio creater please guid me how i use streem for jasperviewer my need is how i open jasperviewer in client computer i test in my server side and get right result please send me code thank's aamir
  15. hi master Sir I use sun java studio creater I successfully call JasperViewer at server side when I run my application at client side JasperViewer. Open automatically at server side not JasperViewer open at client side Please give me idea how I open JasperViewer at client side Thank’s Aamir
×
×
  • Create New...