PDF Reports in servlets

Are there any tools available to generate fairly larger reports ( 50-200
          pages) in PDF through
          servlets. Most of the available components ( KL groups Pagelayout ,
          EnterpriseSoft ERW ) are memory intensive
          and do not scale well for a large number of users.
          

Yes.
          http://xml.apache.org/fop/index.html
          FOP is the world's first print formatter driven by XSL formatting objects.
          It is a Java application that reads a formatting object tree and then turns
          it into a PDF document. The formatting object tree, can be in the form of an
          XML document (output by an XSLT engine like XT or Xalan) or can be passed in
          memory as a DOM Document or (in the case of XT) SAX events.
          Peace,
          Cameron Purdy
          Tangosol, Inc.
          http://www.tangosol.com
          +1.617.623.5782
          WebLogic Consulting Available
          "John Doe" <[email protected]> wrote in message
          news:[email protected]..
          > Are there any tools available to generate fairly larger reports ( 50-200
          > pages) in PDF through
          > servlets. Most of the available components ( KL groups Pagelayout ,
          > EnterpriseSoft ERW ) are memory intensive
          > and do not scale well for a large number of users.
          >
          >
          

Similar Messages

  • Creating PDF report in the servlet

    We have a requirement of creating PDF report in servlet.
    Over all idea of the requirements -
    - Servlet request receives input arguments,
    - JDO fetches data information,
    - need to create form [row and column]
    - send response as outputsream with content type as application/pdf
    Can any one give suggestions on best way to create a form where row and column consist of static text and values fetched from the db?
    There are third party libraries available for creating text table that can be used to design a form in the form of table cells. We do not want to use third party libraries and have dependencies.
    Please let me know, if you need additional info.
    TIA.

    Don't want to use third-party libraries? Then you'll have to write your own code that outputs data according to the PDF specifications. You can download them from Adobe:
    http://partners.adobe.com/public/developer/pdf/index_reference.html
    Personally I would recommend the third-party libraries as this is a very large wheel to reinvent.

  • Storing oracle-reports generated pdf-report onto a blob

    Hey ppl,
    I have this requirement:
    I basically generate a report from Jdev using a remote servlet call to oracle reports, which very neatly generates the pdf document for me and stores it locally. The problem is immediately storing this onto the DB as a blob once the report is generated. I know how to store the pdf as a blob onto the DB. I know how to make the call to oracle-reports and generate my pdf. What I don't know is to sequentially first generate the local pdf report and only once that has been generated proceed to store it onto my DB.
    I want it to be done within the scope of a single request. As in, the entire process should be complete through one cycle. I don't want to keep a day end sort of procedure that inserts into the db at the end of the day.
    As soon as the report has been requested by the user, I want the pdf file(which is generated by the reports) to also be stored onto the DB.
    My problem (which i apologize has been repeated already 2wice above) is that I basically lose control once redirected through the servlet to the report call. There is no way i can instruct Jdev, from the reports side, that the pdf has been generated and now has to be stored onto the DB, as i have lost the session context by redirecting to a different servlet.
    Any help would be GREATLY appreciated.
    Cheers
    K

    Hi,
    its quite some time ago that I a looked Oracle Reports, however, I think that the event mechanism is quite complex to achieve
    I want it to be done within the scope of a single request.
    Which means that if Oracle Reports hangs, the user session follows.
    As in, the entire process should be complete through one cycle.
    Unfortunately you don't control how long reports run, which means that there is no sense in stopping the page lifecycle for this
    I don't want to keep a day end sort of procedure that inserts into the db at the end of the day.
    Fair enough, but as far as I remember there is an eventing in Reports that would allow you to have the Oracle Reports Server triggering the upload
    So I think, the architecture I would go for is:
    - user requests report
    - report generates PDF output
    - reports uploads to DB
    - reports_processing table holds user ID and reports ID plus flag to update when report is done
    - If using JSF, you could use af:poll to check frequently for the report to be finished.
    This here may help: http://www.oracle.com/technology/documentation/reports.html
    Frank

  • Pdf reports on webtoGo ? urgent plz

    Hi ,
    I developed a webtogo offline application and successfully generated the jasper pdf reports on local jdeveloper.Now i am publishing the same on olite server.
    The pdf report first save in /report folder and then open on popup in a new window(works fine on local machine with jdev).
    Now i have a doubt if the same works on server too?
    Does my code works or not?
    becoz i am getting some null pointer exception.The same code i have deployed which is working on local machine.
    error log:
    java.lang.NullPointerException
         at purchasing.pages._error._jspService(_error.java:54)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.lite.web.JupServlet.service(Unknown Source)
         at oracle.lite.web.JspRunner.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at oracle.lite.web.JupServlet.service(Unknown Source)
         at oracle.lite.web.MimeServletHandler.handle(Unknown Source)
         at oracle.lite.web.JupApplication.handle(Unknown Source)
         at oracle.lite.web.JupApplication.service(Unknown Source)
         at oracle.lite.web.JupHandler.handle(Unknown Source)
         at oracle.lite.web.HTTPServer.process(Unknown Source)
         at oracle.lite.web.HTTPServer.include(Unknown Source)
         at oracle.jsp.runtime.OraclePageContext.include(OraclePageContext.java:514)
         at purchasing.pages._main._jspService(_main.java:96)
         at oracle.jsp.runtime.HttpJsp.service(HttpJsp.java:119)
         at oracle.lite.web.JupServlet.service(Unknown Source)
         at oracle.lite.web.JspRunner.service(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at oracle.lite.web.JupServlet.service(Unknown Source)
         at oracle.lite.web.MimeServletHandler.handle(Unknown Source)
         at oracle.lite.web.JupApplication.handle(Unknown Source)
         at oracle.lite.web.JupApplication.service(Unknown Source)
         at oracle.lite.web.JupHandler.handle(Unknown Source)
         at oracle.lite.web.HTTPServer.process(Unknown Source)
         at oracle.lite.web.HTTPServer.forward(Unknown Source)
         at com.osi.sew.servlet.SEWControllerServlet.doDispach(SEWControllerServlet.java:89)
         at com.osi.sew.servlet.ReportServlet.doPost(ReportServlet.java:111)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         at oracle.lite.web.JupServlet.service(Unknown Source)
         at oracle.lite.web.AppServletHandler.handle(Unknown Source)
         at oracle.lite.web.JupApplication.handle(Unknown Source)
         at oracle.lite.web.JupApplication.service(Unknown Source)
         at oracle.lite.web.JupHandler.handle(Unknown Source)
         at oracle.lite.web.HTTPServer.process(Unknown Source)
         at oracle.lite.web.HTTPServer.handleRequest(Unknown Source)
         at oracle.lite.web.JupServer.handle(Unknown Source)
         at oracle.lite.web.SocketListener.process(Unknown Source)
         at oracle.lite.web.ClientListener.process(Unknown Source)
         at oracle.lite.web.SocketListener$ReqHandler.run(Unknown Source)
    Thanks

    r.jsp ----------------- <%@ page contentType="text/html;charset=windows-1252"%> <% String path = com.osi.sew.utils.SEWConstants.SEW_KEYS.CONTEXT_PATH;%> <script type="text/javascript">
    function populateDetails(){
    var processKey = populateDetails.arguments[0];
    var args = populateDetails.arguments[1];
    var ajaxIndex = populateDetails.arguments[2];
    if(processKey == 'advisedby'){
    // <![CDATA[
    function display(obj,id1,id2,id3) {
    txt = obj.options[obj.selectedIndex].value;
    document.getElementById(id1).style.display = 'none';
    document.getElementById(id2).style.display = 'none';
    document.getElementById(id3).style.display = 'none';
    if ( txt.match(id1) ) {
    document.getElementById(id1).style.display = 'block';
    if ( txt.match(id2) ) {
    document.getElementById(id2).style.display = 'block';
    if ( txt.match(id3) ) {
    document.getElementById(id3).style.display = 'block';
    // ]]>
    var url1='<%=(String)request.getAttribute("jasperPrint")%>';
    function open_on_entrance()
    url1 = '<%=(String)request.getAttribute("jasperPrint")%>';
    if(url1 != null)
    window.open(url1, 'iuiu', 'menubar,resizable,status,width=900,height=550,left=30,top=30');
    window.onload = function(){
    if(url1 == 'null'){
    //alert('url is null');
    }else{
    open_on_entrance();
    </script>
    <form action="%3C%=path%20+%20">" method="post" id="reportForm" name="reportForm" &gt;
    <table width="540" cellspacing="0" cellpadding="2">
    <thead>
    <tr>
    <td class="title">Report Type:</td>
    <td class="field"><select name="reportName">
    <option>Please select:</option>
    <option value="vendorReport">Gate Pass - Material Return to Vendor</option>
    <option value="report2">Report 2</option>
    <option value="report3">Report 3</option>
    </select></td>
    </tr>
    </thead>
    <tfoot>
    <tr>
    <td class="align-center" colspan="2"><input type="submit" value="Submit" id="submit" name="submit" class='submit'>
    <input type="reset" value="Reset">
    </td>
    </tr>
    </tfoot>
    <tbody id="report2" style="display: none;">
    <tr>
    <td class="title">B'First Name:</td>
    <td class="field"><input type="text" name="fname" size="15">
    </td>
    </tr>
    <tr>
    <td class="title">B'Last Name:</td>
    <td class="field"><input type="text" name="lname" size="15">
    </td>
    </tr>
    </tbody>
    <tbody id="report3" style="display: none;">
    <tr>
    <td class="title">G'First Name:</td>
    <td class="field"><input type="text" name="fname" size="15">
    </td>
    </tr>
    <tr>
    <td class="title">G'Last Name:</td>
    <td class="field"><input type="text" name="lname" size="15">
    </td>
    </tr>
    </tbody>
    <tbody id="vendorReport" style="display: none;">
    <tr>
    <td class="title">PO Number:</td>
    <td class="field"><input type="text" name="poNumber" size="15">
    </td>
    </tr>
    <tr>
    <td class="title">Receipt Number:</td>
    <td class="field"><input type="text" name="receiptNumber" size="15">
    </td>
    </tr>
    <tr>
    <td class="title">Advised By:</td>
    <td class="field">
    <div><input size="25" type="text" id="advisedBy" name="advisedBy">
    </div>
    <span id="spanEmp" name="spanEmp" class='hidespan'></span></td>
    </tr>
    <tr>
    <td class="title">Prepared By:</td>
    <td class="field">
    <div><input size="25" type="text" id="preparedBy" name="preparedBy">
    </div>
    <span id="spanEmp2" name="spanEmp2" class='hidespan'></span></td>
    </tr>
    </tbody>
    </table>
    </form>
    Servlet.java --------------------------------
    public class ReportServlet extends SEWControllerServlet { private static final String CONTENT_TYPE = "text/html; charset=windows-1252"; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { this.doPost(request,response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String key4nav = request.getParameter(SEWConstants.SEW_KEYS.PARAM_KEY); System.out.println("key4nav..report servlet"+key4nav); String key4next = key4nav; System.out.println("key4next"+key4next); boolean statusFlag = false; JasperReport jasperreport; Connection conn = null; try { if(key4nav.equals(SEWConstants.MODULE_PURCHASING.REPORT)) { String submitBtn = request.getParameter("submit"); String reportName = request.getParameter("reportName"); String location = SEWLoggedInUser.getLocation(); Map parameters = new HashMap(); if(request.getParameter("reportName").equalsIgnoreCase("vendorReport")) { String poNumber = request.getParameter("poNumber"); String receiptNumber = request.getParameter("receiptNumber"); String advisedBy = request.getParameter("advisedBy"); String preparedBy = request.getParameter("preparedBy"); String reportPath= request.getRealPath("/reports"); String reportImagepath= request.getRealPath("/images"); System.out.println("reportImagepath&gt;&gt;"+reportImagepath); jasperreport = JasperCompileManager.compileReport(reportPath+ "/vendor_report.xml"); parameters.put("poNumber",poNumber); parameters.put("receiptNumber",receiptNumber); parameters.put("location",location); parameters.put("advisedBy",advisedBy); parameters.put("preparedBy",preparedBy); parameters.put("reportImagepath",reportImagepath); conn = SEWConnectionManager.getConnection(); // response.setContentType("application/pdf"); // response.setContentLength(0); // ServletOutputStream out = response.getOutputStream(); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperreport, parameters, conn); byte[] bytes= JasperExportManager.exportReportToPdf(jasperPrint); response.setContentType("application/pdf"); //response.addHeader("Content-Disposition", "inline;"); //open in current window response.setHeader ("Content-Disposition","attachment;filename=\"report.pdf\""); //open in new browser window response.setContentLength(bytes.length); ServletOutputStream ouputStream = response.getOutputStream(); ouputStream.write(bytes, 0, bytes.length); ouputStream.flush(); ouputStream.close(); if(conn!=null){ conn.close(); } }
    Here i am the report Image and report xml path using
    String reportPath= request.getRealPath("/reports");
    String reportImagepath= request.getRealPath("/images");
    Does this work on webtogo?How does it look for the location of reports folder and then the xml file?
    Can you tell me how you are getting pdf in your application
    Edited by: rbojja on Jul 14, 2009 1:01 PM
    Edited by: rbojja on Jul 14, 2009 1:02 PM
    Edited by: rbojja on Jul 14, 2009 8:42 PM

  • Exception while generating pdf report using Jasper Report

    Hi experts,
    I am using Jdeveloper : 11.1.2.0.0
    Jaspersoft iReport Designer 4.5.0
    Database is Oracle 11g
    When i try to generate a pdf report ,a pdf file with empty content is generating.
    and exception occuring is
    net.sf.jasperreports.engine.JRException: Error executing SQL statement for : TestReport
         at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:229)
         at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:731)
         at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:629)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.setParameters(JRBaseFiller.java:1159)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:802)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:746)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:58)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:417)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:247)
         at com.empAppln.view.EmployeeRegister.runReport(EmployeeRegister.java:153)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.sun.el.parser.AstValue.invoke(Unknown Source)
         at com.sun.el.MethodExpressionImpl.invoke(Unknown Source)
         at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:105)
         at org.apache.myfaces.trinidadinternal.taglib.listener.FileDownloadActionListener.processAction(FileDownloadActionListener.java:124)
         at oracle.adfinternal.view.faces.event.rich.FileDownloadActionListener.processAction(FileDownloadActionListener.java:77)
         at javax.faces.event.ActionEvent.processListener(ActionEvent.java:88)
         at org.apache.myfaces.trinidad.component.UIXComponentBase.broadcast(UIXComponentBase.java:814)
         at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:179)
         at oracle.adf.view.rich.component.fragment.UIXRegion.broadcast(UIXRegion.java:159)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:1129)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:353)
         at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:204)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
         at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
         at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:173)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:121)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:468)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:293)
         at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:199)
         at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
         at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
         at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
         at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
         at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
         at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
         at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
         at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
         at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:457)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:405)
         at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:889)
         at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:476)
         at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:204)
         at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:540)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:217)
         at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:924)
         at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1261)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1419)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3752)
         at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3806)
         at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1667)
         at weblogic.jdbc.wrapper.PreparedStatement.executeQuery(PreparedStatement.java:135)
         at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:222)
         ... 62 more
    Where TestReport is the name of the report...
    How can i solve this..
    Thanks
    gtg.

    from the error what i understud means.com.empAppln.view.*EmployeeRegister*
    this table is not exits in db. so throw error like this.
    table or view does not exist.and also,
    Stop filedownload if file is empty
    Edited by: ADF 7 on Jan 26, 2012 11:17 PM

  • Add hyperlink in a page to direct to a .pdf report in oracle ADF jdeveloper

    Hi,
    I want to put a hyperlink, which will direct the user to the report. but I am getting the problem with, "where should I put the pdf file" any help please???
    here is my code: 
    <a target="_blank" href="/faces/DocumentationKNM.pdf">Guide Book</a>
    what should be the href?

    Well, this obviously depends on where the pdf report  is on your server and if it's accessible from the web application. For this it must be somewhere in the web root of your application. To access the report somewhere else on the server you can implement a servlet and stream the report from there.
    Summary: we need to describe your use case in more detail.
    Timo

  • Pdf report..need argent help pls....

    hi everybody,
    Pls. tell me some solution of this problem i am really tired with this problem.I am using iText for pdf report.And using table in the report.But if i am printing 2 or 3 records,it's working fine but if i am printing record directly for database,it show me this error...
    ExceptionConverter: java.io.IOException: The document has no pages.
         at com.lowagie.text.pdf.PdfPages.writePageTree(Unknown Source)
         at com.lowagie.text.pdf.PdfWriter.close(Unknown Source)
         at com.lowagie.text.pdf.PdfDocument.close(Unknown Source)
         at com.lowagie.text.Document.close(Unknown Source)
         at org.apache.jsp.Noname1$jsp._jspService(Noname1$jsp.java:160)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:201)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:381)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1027)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1125)
         at java.lang.Thread.run(Thread.java:534)
    and here is my code:
    <%     Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
         conn = DriverManager.getConnection ( "jdbc:odbc:unsoda_project" ,"unsoda_webproject" ,"project");
    str="select * from general_soil where FAMILY like 'sandy, mixed frigid Pachic Haplaboroll'";
         pst3 = conn.prepareStatement(str);
         rs3 = pst3.executeQuery();
    Document document = new Document();
    try {
    PdfWriter.getInstance(document, new FileOutputStream("test1.pdf"));
    document.open();
    Table datatable = new Table(13);
    datatable.setPadding(4);
    datatable.setSpacing(0);
    Cell cell = new Cell(new Phrase("UNSODA DATABASE",FontFactory.getFont(FontFactory.HELVETICA, 24, Font.BOLD)));
    cell.setHorizontalAlignment(Element.ALIGN_CENTER);
    cell.setLeading(30);
    cell.setColspan(13);
    cell.setBorder(Rectangle.NO_BORDER);
    cell.setBackgroundColor(new Color(0xC0, 0xC0, 0xC0));
    datatable.addCell(cell);
                   datatable.setDefaultCellBorderWidth(2);
    datatable.setDefaultHorizontalAlignment(Element.ALIGN_CENTER);
    datatable.setDefaultColspan(13);
                   datatable.addCell("GENERAL PROPERTIES");
                   datatable.setDefaultCellBorderWidth(2);
    datatable.setDefaultHorizontalAlignment(1);
                   datatable.setDefaultRowspan(1);
    datatable.setDefaultColspan(1);
    datatable.addCell("Family");
    datatable.addCell("Series");
    datatable.addCell("Texture");
                   datatable.addCell("Structure");
    datatable.addCell("Depth Upper");
    datatable.addCell("Depth Lower");
                   datatable.addCell("Horizon");
                   datatable.addCell("Depth GWater");
                   datatable.addCell("Location");
                   datatable.addCell("Site ID");
                   datatable.addCell("Annual Rain");
                   datatable.addCell("Avg Temp in Jan");
                   datatable.addCell("Avg Temp in Jul");
                   datatable.endHeaders();
                   datatable.setDefaultCellBorderWidth(1);
    datatable.setDefaultRowspan(1);
                   while(rs3.next()){
                        datatable.addCell(rs3.getString("family"));
                        datatable.addCell(rs3.getString("Series"));
                        datatable.addCell(rs3.getString("Texture"));
                        datatable.addCell(rs3.getString("Depth Upper"));
                   datatable.addCell(rs3.getString("Depth Lower"));
                        datatable.addCell(rs3.getString("Horizon"));
                        datatable.addCell(rs3.getString("Depth GWater"));
                        datatable.addCell(rs3.getString("Location"));
                        datatable.addCell(rs3.getString("Site ID"));
                        datatable.addCell(rs3.getString("Annual Rain"));
                        datatable.addCell(rs3.getString("Avg Temp in Jan"));
                        datatable.addCell(rs3.getString("Avg Temp in Jul"));
                   document.add(datatable);
    catch(Exception e) {
    e.printStackTrace();
    document.close();
    %>
    pls. tell me some solution.
    Thanks
    Sonika

    I found a solution to this problem. You need to 'fragment' your table the following way:
    Add the existing table to the document (after, say, 50 rows)
    Remove all rows from the existing table
    Set skipFirstHeader() to true (or the header will repeat)
    Add new rows to the table until you hit the threshhold
    At the end, add the final table fragment to the documentThe issue apparently stems from memory management within i-Text and the amount of data that can be held in a stream. You can find a code example at:
    http://itext.sourceforge.net/examples/com/lowagie/examples/objects/tables/pdfptable/FragmentTable.java
    Happy rendering.
    - Saish

  • Display Pdf report on Frame using iText library

    Hi,
    I am able to generate pdf reports using iText library. but i want to display these generated pdf into frame. can u please help for this.
    this is web based application. Through servlet i am generating the pdf report using iText library. I am waiting for your reply ....

    Does this PDF file absolutely need to be displayed within a JFrame? You say you are generating this document on the server side, so if this is a web application, what I might do is place the generated document on directory accessible through http, then on the client browser side open a pop-up browser window with a URL to the PDF document.
    Most browsers have a PDF viewer plugin of some kind.
    If this is a swing application then you can do the same thing but instead of redirecting the browser to the PDF file you can use iText to convert the PDF document to an RTF document and use an RTFEditorKit within a JEditorPane to display the same document in RTF format.

  • Generate Pdf Report using OAF

    Hi,
    I need to generate Pdf Report using OAF.. I dont know how to generate Pdf reports..
    Can anyone help me to do it using OAF..
    Please tell me what steps i need to use and any jar files required for doing it...
    Thanks,
    Babu

    Hi Guys ,
    I found the classes the DocumentHelper class is found in
    oracle.apps.xdo.oa.common.DocumentHelper
    The properties class was in java.util.properties
    I compiled the code and when i run it i get the following exception
    oracle.apps.fnd.framework.OAException: Application: FND, Message Name: SYSTEM-ERROR. Tokens: MESSAGE = Io exception: Got minus one from a read call; (Could not lookup message because there is no database connection)
         at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:988)
         at oracle.apps.fnd.framework.server.OAUtility.getWebAppsContext(OAUtility.java:352)
         at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(CreateIcxSession.java:144)
         at oracle.apps.fnd.framework.CreateIcxSession.createSession(CreateIcxSession.java:80)
         at runregion.jspService(runregion.jsp:96)
         at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
         at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
         at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
         at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
         at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
         at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
         at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
         at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:797)
    I get the exception at this point in the code :
    String dataDefCode = "DTFEMP" ;
    String dataDefApp = "CIE";
    DataTemplate datatemplate = new DataTemplate(((OADBTransactionImpl)getOADBTransaction()).getAppsContext(), dataDefApp,dataDefCode );
    Thanks
    Tom...

  • A Pdf Reports

    Hi,
    how can i generate o pdf reports using Web_show_document() ????
    thanx for replies

    Hello,
    WEB.SHOW_DOCUMENT is just an Oracle Forms builtin to "launch" an URL.
    To generate a PDF output using the Reports Servlet you have to use an URL like :
    http://server:port/reports/rwservlet?report=test&destype=cache&desformat=pdf
    http://download-uk.oracle.com/docs/cd/B14099_17/bi.1012/b14048/pbr_run.htm#i1008443
    Regards

  • Authid= RWUser for excel reports. Authid=userid for pdf reports

    I have the following 2 questions:
    1) I get the following error when I try to run a jsp report (for excel output), when I pass authid (that is the actual userid who is running the report)
    javax.servlet.jsp.JspException: REP-50171: Authentication failed
    2)When I run a pdf report, I go through the rwservlet. In that case if I pass the authid as parameter, the correct value is passed. However, when I run an excel report, From the UI (jsp), the report (jsp) is invoked without going through the rwservlet (the way we invoke rdf's). In that case the auth id that is passed to the report is not the actual user id but RWUser. Where am I going wrong that the authid is not the actual userid but RWUser in case of excel (jsp) reports?
    This is how I invoke jsp:
    http://servername:port/reports/prj/prjreports/repname.jsp?....

    Questions rephrase:
    1. Is the output is same for HTML and Excel options ?
    2. Why the output is viewable with HTML option and not with Excel option ?
    Customer has XML Publisher Version 5.0.1 and in the process of applying 5.6.1
    Thanks,
    V

  • Oracle Reports - PDF report

    I have a PDF report designed using oracle report builder 6i. This report has a margin that prints the total of all the quantities to be ordered via a QUOTE. If this report prints beyond one page, then the total will print on all the pages. Users do not want to see the total on all the pages but only on the last page. I really need to keep these total fields on the MARGIN section of the layout. Is there any way, i can still keep these fields on the margin and print them only on the last page of the report? The report builder do not let me set the 'print condition' as the 'last page' because it is in the margin section. Any idea on this issue??

    I would create a trigger for your MARGIN totals so they print only on the last page.
    Have the trigger return TRUE if current page = total pages, else return FALSE.
    This will make sure your margin totals are only visible on the last page.

  • How to make column headers in table in PDF report appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp

    Hi my name is vishal
    For past 10 days i have been breaking my head on how to make column headers in table appear bold while datas in table appear regular from c# windows forms with sql server2008 using iTextSharp.
    Given below is my code in c# on how i export datas from different tables in sql server to PDF report using iTextSharp:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Windows.Forms;
    using System.Data.SqlClient;
    using iTextSharp.text;
    using iTextSharp.text.pdf;
    using System.Diagnostics;
    using System.IO;
    namespace DRRS_CSharp
    public partial class frmPDF : Form
    public frmPDF()
    InitializeComponent();
    private void button1_Click(object sender, EventArgs e)
    Document doc = new Document(PageSize.A4.Rotate());
    var writer = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    doc.SetMargins(50, 50, 50, 50);
    doc.SetPageSize(new iTextSharp.text.Rectangle(iTextSharp.text.PageSize.LETTER.Width, iTextSharp.text.PageSize.LETTER.Height));
    doc.Open();
    PdfPTable table = new PdfPTable(6);
    table.TotalWidth =530f;
    table.LockedWidth = true;
    PdfPCell cell = new PdfPCell(new Phrase("Institute/Hospital:AIIMS,NEW DELHI", FontFactory.GetFont("Arial", 14, iTextSharp.text.Font.BOLD, BaseColor.BLACK)));
    cell.Colspan = 6;
    cell.HorizontalAlignment = 0;
    table.AddCell(cell);
    Paragraph para=new Paragraph("DCS Clinical Record-Assigned Dialyzer",FontFactory.GetFont("Arial",16,iTextSharp.text.Font.BOLD,BaseColor.BLACK));
    para.Alignment = Element.ALIGN_CENTER;
    iTextSharp.text.Image png = iTextSharp.text.Image.GetInstance("logo5.png");
    png.ScaleToFit(105f, 105f);
    png.Alignment = Element.ALIGN_RIGHT;
    SqlConnection conn = new SqlConnection("Data Source=NPD-4\\SQLEXPRESS;Initial Catalog=DRRS;Integrated Security=true");
    SqlCommand cmd = new SqlCommand("Select d.dialyserID,r.errorCode,r.dialysis_date,pn.patient_first_name,pn.patient_last_name,d.manufacturer,d.dialyzer_size,r.start_date,r.end_date,d.packed_volume,r.bundle_vol,r.disinfectant,t.Technician_first_name,t.Technician_last_name from dialyser d,patient_name pn,reprocessor r,Techniciandetail t where pn.patient_id=d.patient_id and r.dialyzer_id=d.dialyserID and t.technician_id=r.technician_id and d.deleted_status=0 and d.closed_status=0 and pn.status=1 and r.errorCode<106 and r.reprocessor_id in (Select max(reprocessor_id) from reprocessor where dialyzer_id=d.dialyserID) order by pn.patient_first_name,pn.patient_last_name", conn);
    conn.Open();
    SqlDataReader dr;
    dr = cmd.ExecuteReader();
    table.AddCell("Reprocessing Date");
    table.AddCell("Patient Name");
    table.AddCell("Dialyzer(Manufacturer,Size)");
    table.AddCell("No.of Reuse");
    table.AddCell("Verification");
    table.AddCell("DialyzerID");
    while (dr.Read())
    table.AddCell(dr[2].ToString());
    table.AddCell(dr[3].ToString() +"_"+ dr[4].ToString());
    table.AddCell(dr[5].ToString() + "-" + dr[6].ToString());
    table.AddCell("@count".ToString());
    table.AddCell(dr[12].ToString() + "-" + dr[13].ToString());
    table.AddCell(dr[0].ToString());
    dr.Close();
    table.SpacingBefore = 15f;
    doc.Add(para);
    doc.Add(png);
    doc.Add(table);
    doc.Close();
    System.Diagnostics.Process.Start("AssignedDialyzer.pdf");
    if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.Yes)
    var writer2 = PdfWriter.GetInstance(doc, new FileStream("AssignedDialyzer.pdf", FileMode.Create));
    else if (MessageBox.Show("Do you want to save changes to AssignedDialyzer.pdf before closing?", "DRRS", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Exclamation) == DialogResult.No)
    this.Close();
    The above code executes well with no problem at all!
    As you can see the file to which i create and save and open my pdf report is
    AssignedDialyzer.pdf.
    The column headers of table in pdf report from c# windows forms using iTextSharp are
    "Reprocessing Date","Patient Name","Dialyzer(Manufacturer,Size)","No.of Reuse","Verification" and
    "DialyzerID".
    However the problem i am facing is after execution and opening of document is my
    column headers in table in pdf report from
    c# and datas in it all appear in bold.
    I have browsed through net regarding to solve this problem but with no success.
    What i want is my pdf report from c# should be similar to following format which i was able to accomplish in vb6,adodb with MS access using iTextSharp.:
    Given below is report which i have achieved from vb6,adodb with MS access using iTextSharp
    I know that there has to be another way to solve my problem.I have browsed many articles in net regarding exporting sql datas to above format but with no success!
    Is there is any another way to solve to my problem on exporting sql datas from c# windows forms using iTextSharp to above format given in the picture/image above?!
    If so Then Can anyone tell me what modifications must i do in my c# code given above so that my pdf report from c# windows forms using iTextSharp will look similar to image/picture(pdf report) which i was able to accomplish from
    vb6,adodb with ms access using iTextSharp?
    I have approached Sound Forge.Net for help but with no success.
    I hope anyone/someone truly understands what i am trying to ask!
    I know i have to do lot of modifications in my c# code to achieve this level of perfection but i dont know how to do it.
    Can anyone help me please! Any help/guidance in solving this problem would be greatly appreciated.
    I hope i get a reply in terms of solving this problem.
    vishal

    Hi,
    About iTextSharp component issue , I think this case is off-topic in here.
    I suggest you consulting to compenent provider.
    http://sourceforge.net/projects/itextsharp/
    Regards,
    Marvin
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Generate a new pdf report with itens on my pdf form

    Hi! My name is Heitor.
    I have Adobe Forms Central and Adobe Acrobat XI Pro installed on my machine.
    I would like to know if its possible to make a pdf report.
    Example: Clicking in a button "print" on my already open and filled pdf form, and gathering all my 30 itens (see that i am only showing 5 itens on my form. but on my form exists a "Add" button to add itens on variables) on a dropdown list and generating a new pdf report with all these itens listed.
    Thanks!
    Heitor Teixeira
    www.heitorteixeira.com

    Hi! My name is Heitor.
    I have Adobe Forms Central and Adobe Acrobat XI Pro installed on my machine.
    I would like to know if its possible to make a pdf report.
    Example: Clicking in a button "print" on my already open and filled pdf form, and gathering all my 30 itens (see that i am only showing 5 itens on my form. but on my form exists a "Add" button to add itens on variables) on a dropdown list and generating a new pdf report with all these itens listed.
    Thanks!
    Heitor Teixeira
    www.heitorteixeira.com

  • Report Logo - Displays on HTML, not on PDF report

    Hello once again Gurus.
    We have a system environment setup where we have BI Publisher Enterprise and Apex 3.1.2 talking together to create PDF reports on a Oracle 10g database (R2 I think, I'm uncertain). As part of a business requirement, depending on what project you are looking at within our apex application, when printing a report you see a logo specific to the project. We have already developed this using a RTF template with a dummy image embedded, and +url:{concat(.//URL,.//PROJECT_ID)}+ in the Alternative Text field of the Web tab of the Format Picture dialogue.
    This worked fine when using the RTF templates as Report Layouts within Apex and as templates within a BI Publisher report.
    However, now logos aren't appearing.
    I am not sure if we have upgraded the version of BI Publisher, but we are running Apex 3.1.2.00.02 on Dev and Apex 3.1.1.00.09 on test and prod, however none of these environments are outputting logos in the PDF reports.
    Curiously, if I go into the BI Publisher interface and ask for the report to be outputted as HTML, the image shows. Running the HTML version of the report from Apex also shows the logo -- but the logo isn't showing in the PDF reports.
    As I continue trouble shooting, any assistance would be greatly appreciated.
    Edit: We are on BIP 10.1.3.2

    If anyone could give us any insight on this, it would be appriciated.
    I'm unsure if its a permissions problem with the PDF seeing the image, or something related to server setup. We currently have a redirect in place to production that doesn't include the :7777 in the URL, and for some reason, if the G_URL for the image is changed to this portless URL, the image is embedded. However, this redirect was in place for another application, and will soon be locked down, so is not available for a long term solution to this problem

Maybe you are looking for

  • New iPad AirPlay Icon in Music app

    I have had this happen twice now so I am thinking it may be a bug. When in the music app on the new iPad, clicking the AirPlay icon only shows the iPad in the list even though I have an Apple TV. If I go to the AirPlay to mirror the iPad, the Apple T

  • LANDED COST NEEDED DURING INVOICE

    Hi      while doing STO from plant to plant in same company code after doing VL10B and VL02N while doing invoice JI1S  Mat assessable  value is picking from ji1d, here i want landed cost. that is the po in condition .here how can get the landed cost

  • So,Is it called "manually manage music"?

    I use my itunes and i tick "manually manage music''  in the index of my iphone,and it works fine,I could drag the music I want. But it is strange when i plug my iphone to another computer,the tick is gone,and of course I can't Add/remove music. When

  • GR Returns Data missing from 2LIs_02_SCL

    Hi All, While extracting the data from 2lis_02_scl, I am missing the data for Returns. All the steps for activating the process keys (MCB_ & MCB0 & BF11) is set as explained in OSS notes....The problem still exists. The extractor simply ignores the r

  • Canon iRC3580 don´t work with Snow Leopard

    Hello, do you know if there is a driver for the iRC3580 printer from Canon? It is not possible to print with the driver from Canon. And if i am installing the printer as a PostScript printer, everything what i am printing is black and white. Help wou