Named Column FOP Error

I am trying to generate PDF reports using a named column template.
APEX 4.1, using the APEX-supplied FOP.war deployed on Glassfish 4.
I am using a Report Query - Report Layout.
Whenever I use a generic report template, all works fine.
When I use a named column report generated with Stylus Studio. I get this error (from the server.log):
[2014-01-02T19:08:44.375-0500] [glassfish 4.0] [WARNING] [] [javax.enterprise.web] [tid: _ThreadID=23 _ThreadName=http-listener-1(5)] [timeMillis: 1388707724375] [levelValue: 900] [[
  StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
java.lang.NullPointerException
    at java.io.StringReader.<init>(StringReader.java:50)
    at org.apache.jsp.apex_005ffop_jsp._jspService(apex_005ffop_jsp.java:73)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:411)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:473)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:377)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
    at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
    at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
    at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:357)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:260)
    at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:188)
    at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:191)
    at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:168)
    at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:189)
    at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:288)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:206)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:136)
    at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:114)
    at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
    at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:838)
    at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:113)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:115)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:55)
    at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:135)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:564)
    at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:544)
    at java.lang.Thread.run(Thread.java:722)
In my original template - which worked fine in Stylus Studio - I had XPath for color-coding text based on values, and background-color coding certain rows based on values. I noticed Stylus Studio inserts special characters, including
I redid the Stylus Studio template, bringing it down to bare-bones, Title and Table.
Same issue.
The template is:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:s="http://www.stylusstudio.com/xquery">
     <xsl:template match="/">
         <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
             <fo:layout-master-set>
                 <fo:simple-page-master master-name="default-page" page-height="8.5in" page-width="11in" margin-left="0.5in" margin-right="0.5in" margin-top="0.5in" margin-bottom="0.5in">
                     <fo:region-body/>
                 </fo:simple-page-master>
             </fo:layout-master-set>
             <fo:page-sequence master-reference="default-page">
                 <fo:flow flow-name="xsl-region-body">
                     <fo:block>
                         <fo:block text-align="center">
                             <fo:block>
                                 <fo:inline font-family="Tahoma">
                                     <xsl:value-of select="/DOCUMENT/TITLE"/>
                                 </fo:inline>
                             </fo:block>
                             <fo:block>
                                 <fo:table width="100%" border-style="solid" border-width="1pt" background-repeat="repeat">
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-column/>
                                     <fo:table-body>
                                         <fo:table-row background-color="green">
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" text-align="center" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Inst Type</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Test</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Reagent</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Units</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>QC Lot</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Laboratory</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Inst</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>N</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Mean</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>SD</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>CV</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>TEa Fixed</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>TEa Pct</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Peer ean</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Sigma</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Sigma w/Bias</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Grade</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                             <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                 <fo:block font-family="Times New Roman" font-size="9pt" color="#FFFFFF" background-color="#008000">
                                                     <fo:block>
                                                         <xsl:text>Grade w/Bias</xsl:text>
                                                     </fo:block>
                                                 </fo:block>
                                             </fo:table-cell>
                                         </fo:table-row>
                                         <xsl:for-each select="/DOCUMENT/REGION/ROWSET/ROW">
                                             <xsl:variable name="ROW" select="."/>
                                             <fo:table-row>
                                                 <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                     <fo:block font-family="Times New Roman" font-size="9pt">
                                                         <fo:block>
                                                             <xsl:value-of select="INSTRUMENT_NAME"/>
                                                         </fo:block>
                                                     </fo:block>
                                                 </fo:table-cell>
                                                 <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                     <fo:block font-family="Times New Roman" font-size="9pt">
                                                         <fo:block>
                                                             <xsl:value-of select="TEST_NAME"/>
                                                         </fo:block>
                                                     </fo:block>
                                                 </fo:table-cell>
                                                 <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                     <fo:block font-family="Times New Roman" font-size="9pt">
                                                         <fo:block>
                                                             <xsl:value-of select="REAGENT"/>
                                                         </fo:block>
                                                     </fo:block>
                                                 </fo:table-cell>
                                                 <fo:table-cell border-style="solid" border-width="1pt" border-color="gray" padding="2pt" background-repeat="repeat" display-align="center">
                                                     <fo:block font-family="Times New Roman" font-size="9pt">
                                                         <fo:block>
                                                             <xsl:value-of select="UNITS"/>
                                                         </fo:block>
                                                     &l

Hello Mike,
Thanks for that but .. I had followed that paper exactly. When it gets to the "...make some fomrattign changes ..." part, the doc is not very specific. While I have yet to prove this out ( I have an APEX Listener, APEX 4.2 instance as well), I believe my template was incorrect no matter which APEX version (4.1 vs 4.2) or using the APEX Listener vs Glassfish deployment - the problem was indeed with my template.
The main issue blocking PDF generation was the fact that in my template, I did not have column-width's assigned to my <fo:table-column ...> directives.   When I use Stylus Studio, the default post-processor is RenderX.XEP, not Apache FOP.  Apache FOP has more limitations .. or the RenderX post-processing is more advanced, however you want look at it.  Stylus Studio
Once I got the column-width's defined, I had to go step by step in adding additional features to the template, paying particular attention to Apache FOP documentation and  Known Issues.  Switching the post-processor to Apache FOP in the Stylus Studio Scenario properties helps, but does not catch everything.
I am plugging along .. my latest learning experience is that the nice XPath that works in Stylus Studio does not directly translate to Apache FOP ...I need to implement same using XSLT. 
Fun with FOP!
Back to Mike's point of using the APEX Listener and APEX 4.2 .. if I could, I would, but we cannot upgrade until next year sometime, so I've got to work with what I've got. For kicks, when I have time, I'll compare results between APEX 4.1 APEX-supplied FOP.war and the APEX 4.2 APEX-supplied FOP.war, to see the differences. It's still Apache FOP, so there may be someimprovements, but I sitll expect to need to stick to strict Apache FOP and XLST 1.0, which is clearly stated.

Similar Messages

  • Report Query using a Named Column Report Layout fails to produce PDF

    I am testing FOP and the Shared Component Report Queries query with a Named Column Report Layout. The xsl file was built using Stylus Studio and worked fine with the saved XML data file in Stylus Studio.
    500 Internal Server Error
    500 Internal Server Error
    Servlet error: An exception occurred.
    The current application deployment descriptors do not allow for including it in this response.
    Please consult the application log for details.
    I assume this is a message from FOP. What do I do now?
    tia,
    Sam

    Sam,
    I would suggest to take APEX out of the picture first and see if you can get this to work directly with your FOP solution, i.e. generate the XML data and take your XSL file and then post it directly to the FOP JSP (or whichever rendering engine you use). If this works, the problem might be somewhere in your APEX configuration. If it doesn't work, then the problem is likely in your XSL or XML structure. Here's how you can setup a static HTML page to post your XML and XSL to FOP:
    http://marcsewtz.blogspot.com/2008/06/heres-another-posting-on-pdf-printing.html
    Regards,
    Marc

  • Example Named Column Report Layout?

    Howdy,
    Using APEX 3.1.2, I've successfully setup and tested Apache FOP for a print server. I'm hoping to create a multi-line report layout to emulate the MS Access (of Evil) one this app is replacing, but I'm having trouble getting started.
    It seems that I need to create a Named Column report layout. I've been scouring this forum, the web, and even the new Pro APEX book to find an example of the contents of even the simplest of these XSL-FO files, but I can't find one anywhere. Granted, a little XSL-FO experience would help here, but I can't seem to glean enough from the web to put the pieces together, at least as it applies to APEX. It seems that the examples I do find contain static data, whereas it looks like I should be creating a template form for APEX to populate for passing onto the FOP engine.
    Does anyone have a simple two-column layout they'd be willing to share? Or a good weblink?
    TIA!
    Rich

    Hi Rich,
    This is an example we use in our training:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:fox="http://xml.apache.org/fop/extensions" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://icl.com/saxon" extension-element-prefixes="saxon" >
    <xsl:template match="DOCUMENT">
    <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
    <fo:layout-master-set>
    <fo:simple-page-master master-name="pagemaster1" page-height="845.0pt" page-width="598.0pt" margin-top="10.0pt" margin-left="10.0pt" margin-bottom="10.0pt" margin-right="10.0pt">
    <fo:region-body margin-left="28.0pt" margin-top="28.0pt" margin-bottom="28.0pt" margin-right="28.0pt"/>
    <fo:region-before extent="28.0pt" precedence="true"/>
    <fo:region-after extent="28.0pt" precedence="true"/>
    <fo:region-start extent="28.0pt" precedence="false"/>
    <fo:region-end extent="28.0pt" precedence="false"/>
    </fo:simple-page-master>
    </fo:layout-master-set>
    <fo:page-sequence master-name="pagemaster1" master-reference="pagemaster1">
    <xsl:attribute name="force-page-count">no-force</xsl:attribute>
    <fo:static-content flow-name="xsl-region-before">
    <fo:block-container position="absolute" top="3.0pt" left="357.0pt" height="25.0pt" width="216.0pt">
    <fo:block line-height="14.399999999999999pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" position="relative" top="3.0pt" left="357.0pt" height="25.0pt" width="216.0pt" color="#000000" font-family="Arial" font-size="12.0pt" font-style="italic">
    <fo:block text-align="left" white-space-collapse="false"  linefeed-treatment="preserve" >
    <fo:inline>
    <xsl:text>Report ran by: </xsl:text></fo:inline>
    <fo:inline>
    <xsl:value-of disable-output-escaping="no" select="USER_NAME"/>
    </fo:inline>
    </fo:block>
    </fo:block>
    </fo:block-container>
    </fo:static-content>
    <fo:static-content flow-name="xsl-region-after"/>
    <fo:static-content flow-name="xsl-region-start"/>
    <fo:static-content flow-name="xsl-region-end"/>
    <fo:flow flow-name="xsl-region-body">
    <fo:block/>
    <fo:block-container position="absolute" top="4pt" left="2pt" height="752.0pt" width="536.0pt" border-width="1.0pt"> <fo:block span="none" white-space-collapse="false" font-family="Helvetica" font-size="12pt" text-align="start" position="relative" top="44pt" left="27pt" height="752.0pt" width="536.0pt"><fo:instream-foreign-object xmlns:xlink="http://www.w3.org/1999/xlink"></fo:instream-foreign-object></fo:block></fo:block-container><fo:block span="none"><!-- GENERATE TABLE START-->
    <fo:table table-layout="fixed">
    <fo:table-column column-width="80.0pt"/>
    <fo:table-column column-width="80.0pt"/>
    <fo:table-column column-width="80.0pt"/>
    <fo:table-column column-width="80.0pt"/>
    <fo:table-body>
    <fo:table-row>
    <fo:table-cell display-align="before" background-color="#cccccc">
    <fo:block line-height="19.2pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
    <xsl:text>Ename</xsl:text></fo:block>
    </fo:table-cell>
    <fo:table-cell display-align="before" background-color="#cccccc">
    <fo:block line-height="19.2pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
    <xsl:text>Hiredate</xsl:text></fo:block>
    </fo:table-cell>
    <fo:table-cell display-align="before" background-color="#cccccc">
    <fo:block line-height="19.2pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
    <xsl:text>Job</xsl:text></fo:block>
    </fo:table-cell>
    <fo:table-cell display-align="before" background-color="#cccccc">
    <fo:block line-height="19.2pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" background-color="#cccccc" color="#000000" font-family="Arial" font-size="16.0pt" font-weight="bold">
    <xsl:text>Salary</xsl:text></fo:block>
    </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
    <fo:table-cell display-align="before">
    <fo:block line-height="14.5pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
    <xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/ENAME"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell display-align="before">
    <fo:block line-height="14.5pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
    <xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/HIREDATE"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell display-align="before">
    <fo:block line-height="14.5pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
    <xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/JOB"/>
    </fo:block>
    </fo:table-cell>
    <fo:table-cell display-align="before">
    <fo:block line-height="14.5pt" white-space-collapse="false"  linefeed-treatment="preserve"  text-align="start" color="#000000" font-family="Arial" font-size="12.0pt">
    <xsl:value-of disable-output-escaping="no" select="REGION/ROWSET/ROW/SAL"/>
    </fo:block>
    </fo:table-cell>
    </fo:table-row>
    <fo:table-row>
    <fo:table-cell/><fo:table-cell/><fo:table-cell/><fo:table-cell/></fo:table-row>
    </fo:table-body>
    </fo:table>
    </fo:block></fo:flow>
    </fo:page-sequence>
    </fo:root>
    </xsl:template>
    </xsl:stylesheet>XSL-FO is not the easiest thing to learn ;-) but hopefully the above gives you a headstart.
    Regards,
    Dimitri
    http://dgielis.blogspot.com/
    http://www.apex-evangelists.com/
    http://www.apexblogs.info/

  • How to use : bind character in DB adapter Select Query SOA11g. Getting Error code :17003 .java.sql.SQLException: Invalid column index error

    Hi All,
    The Actual query to perform is below.
    SELECT name,number from emp  WHERE CASE WHEN :1='T' AND term_date IS Not NULL THEN 1 WHEN :1='A' AND term_date IS NULL THEN 1 WHEN :1='ALL' THEN 1 ELSE  1 END = 1;
    I have tried in DB adapter like below as a parameter for :1 as #vInputParam
    SELECT name,number from emp  WHERE CASE WHEN #vInputParam='T' AND term_date IS Not NULL THEN 1 WHEN #vInputParam='A' AND term_date IS NULL THEN 1 WHEN #vInputParam='ALL' THEN 1 ELSE  1 END = 1;
    Getting Error code :17003 .java.sql.SQLException: Invalid column index error.
    Please suggest me on using ':' bind character in DB adapter Select Query SOA11g.
    Can someone help me on this please?
    Thanks,
    Hari

    Hi,
    Could you please make sure your binding style(Oracle Positional,Oracle named..etc) of the Seeded VO and Custom Vo are same.
    This is the option you will get when you are extending your vo. So make sure that both are same.
    You can refer the below link too
    VO extension leads to "Invalid column index" exception
    Thanks
    Bharat

  • Case Decode - invalid column name error

    select Workweek, max( decode( Type, T34, prct, null ) ) Bad,
                        max( decode( Type, T35, prct, null ) ) Repair,
                        max( decode( Type, T36, prct, null ) ) Good
    FROM
    (select Workweek, Type, round(ratio_to_report(sum(Testtime_in_Minutes)) over(partition by Workweek)*100,3) prct
    FROM
    (select ts.lot as Lot, ts.wafer_id as Wafer, dt.SORT_X as X, dt.SORT_Y as Y, ts.devrevstep as PRODUCT, ts.operation as OPERATION, dt.INTERFACE_BIN as INTERFACE_BIN, (dt.TEST_TIME)/60.0 as Testtime_in_Minutes,
    ts.TEST_END_DATE_TIME as Test_End_Time, ts.Program_Name, ts.test_end_work_week as Workweek,
    (CASE
    WHEN (dt.INTERFACE_BIN > 9 AND dt.INTERFACE_BIN < 15) THEN 'T34'
    WHEN (dt.INTERFACE_BIN =30 OR dt.INTERFACE_BIN =31 OR dt.INTERFACE_BIN = 32 OR dt.INTERFACE_BIN = 33) THEN 'T35'
         ELSE 'T36'
         END ) Type
    from a_testing_session ts, a_device_testing dt
    where ts.test_end_work_week >= 200715
    and (ts.devrevstep like '9600%')
    and dt.lao_start_ww = ts.test_end_work_week
    and dt.ts_id = ts.ts_id)
    GROUP BY Workweek, Type)
    This sql query above does not run properly, gives invalid column name error. However, the entire select statement surrounded by the () works. There must be an error in the first 4 lines someplace, but I do not see it.

    Assuming type is a string, I assume you meant
    MAX( DECODE( type, 'T34', prct, NULL )) Badwhere T34 is a string literal. Otherwise, you'd need to have columns named T34, T35, and T36 in your inner select.
    One note, though, it's probably a bad idea to have a column named Type. While it's legal to do so, TYPE is a keyword in SQL, so that name will at a minimum be confusing.
    Justin

  • DAX: CALCULATE on SUMMARIZE with named column ?

    hi all,
    I have a SUMMARIZE over a group of columns, with a *named column* for a particular calculation for a set of values, that works great.  I would like to further do a MAX on this entire SUMMARIZE table however I get an error that the named column inside
    of the SUMMARIZE is not able to be identified within the outer CALCULATE call.  I am missing something basic, I believe.
    For example, using AdventureWorks, how would I get the MAX of the "AvgOrder" below   (I know it does not make much sense, this is just a stripped down example for troubleshooting purposes).
    DEFINE 
    MEASURE 'Internet Sales'[DistinctDays] = distinctcount('Internet Sales'[Order Date])
    EVALUATE 
    SUMMARIZE('Internet Sales', 
     [Ship Date], "AvgOrder", SUM('Internet Sales'[Sales Amount])/[DistinctDays] )
    Any help is much appreciated .
    Cos

    Hi Cos2008,
    Glad to hear that you issue had been solved. Thank you for your sharing.
    Regards,
    Charlie Liao
    TechNet Community Support

  • INNER JOIN, MX 7, column name error

    I am running or attempting to run the att'd query in CF MX
    7.0 and getting an error because I then run:
    <CFOUTPUT QUERY="getNutes" group="NUTR_NO">
    <CFSET VALUE = 0>
    <CFOUTPUT>
    <CFIF Day EQ "T">
    <CFSET VALUE = VALUE + (getNutes.Total_WT *
    getNutes.NUTR_VAL/100) / getDays.RecordCount>
    <CFELSE>
    <CFSET VALUE = VALUE + (getNutes.Total_WT *
    getNutes.NUTR_VAL/100)>
    </CFIF>
    </CFOUTPUT>
    To sum the nutrient contents...
    This worked fine under CF 5... but I am getting a 'NUTR_NO
    does not specify a column name in the query'.
    Any thoughts???
    Query follows:

    > Yep... it's worse... it appears that MX does not support
    the sql inner join or
    > outer join... sigh...
    Don't be ridiculous. You're showing a fundamental lack of
    understanding of
    how CF handles database interaction. When you use
    <cfquery> to "create" a
    recordset, all CF does is resolve any embedded CF (tags,
    functions,
    variables, etc), and passes the resulting string to the DB.
    The DB then
    processes it and returns a recordset. So CF doesn't "support"
    any sort of
    SQL syntax. Now does it claim to; nor does it try to; nor is
    it
    appropriate for it to.
    If you're having problems with your returned recordset, the
    first thing you
    should do is <cfdump> it (or part of it) and check that
    you're getting back
    what you're *assuming* you're getting back.
    The second thing you should do is lose the SELECT *. Specify
    the columns
    you want back. This is nothing to do with CF, it's just
    standard SELECT
    query advice. When you're joining tables, you hardly ever
    want ALL the
    columns back, and if it's one of those rare occasions you DO
    want all of
    them, you should still specify a SELECT clause so you can
    distinguish
    between same-named columns (which seems to be your problem
    here).
    Adam

  • "This page contains the following errors: error on line 1 at column 1: error on line 1 at column 1: Encoding error Below is a rendering of the page up to the first error"

    I am getting this error since purchasing my latest book:
    “This page contains the following errors: error on line 1 at column 1: error on line 1 at column 1: Encoding error
    Below is a rendering of the page up to the first error”
    This message also appears on some, but not all books I purchased earlier.
    I've tried to restart my iPhone (5) and downloaded iBooks (and the books itself) again several times but nothing has changed. I’m also synced the iPhone via iTunes without luck.
    It’s the latest version of iBooks from Appstore. The same books on iBooks for iPad and Mac working fine!
    iOS 7.0.6
    iBooks 3.2 (2083)

    Did you Reset your iphone?

  • SAP HANA XSODATA service (Service exception: column store error.)

    Hi all,
    i have a problem with my calculation view using xsodata service on it. (There's an input parameter called P
    _SWERK)
    In my calculation view, the data origin are two analytic views (on which the input parameter P_SWERK should be filter data at beginning of the sql script code).
    First i read the analytic views with function CE_OLAP_VIEW and after i do a CE_PROJECTION function on them using the input parameter P_SWERK like a filter on field SWERK.
    But when i run my application on browser the following error occurs :
    <message xml:lang="en-US">Service exception: column store error.</message>
    The link is this :
    http://host:port/Project_DM/services/Test/TEST_ZIIG_PDM_CALC_VIEW_FINAL_service.xsodata/PianiDiManutenzioneParameters(P_SWERK='CO05')/Results
    The service definition is :
    service {
    "EricssonItalgas/TEST_ZIIG_PDM_VIEW_FINAL.calculationview" as "PianiDiManutenzione" keys generate local "ID"
    parameters via entity;
    The SAP HANA AWS revision is 60.
    Someone could you help me,please?
    Thanks in advance.
    Dario.

    Hi Dario,
    Does the calculation view work without xsodata service? From the URL, your XS project name should be Project_DM, but from the xsodata source, the project name is EricssonItalgas. I'm confused with this. Did you use rewrite_rules or?
    Best regards,
    Wenjun

  • Error in running a query in XSJS - column store error: [2950] user is not authorized :  at ptime/session/dist/RemoteQueryExecution.cc:1354]

    Hi All,
    I get the below error when i load my xsjs file in browser,
    Error while executing query: [dberror(PreparedStatement.executeQuery): 2048 - column store error: column store error: [2950] user is not authorized : at ptime/session/dist/RemoteQueryExecution.cc:1354]
    I am able to execute the same query in  HANA SQL editor
    Please note that ,No Analytical privileges are applied to the view.
    Could you please help solving this issue.
    Regards,
    Logesh Kumar.

    Hay,
    are you using the same Database user for both SQL Editor and XSJS ?
    try the following.
    Before executing the query , display it and copy the same from browser and execute in SQL editor.
    Put the statement in  a try catch block and analyse the exception .
    Sreehari

  • Invalid column Index error - While consuming Calculation view via Native SQL

    Hi Experts,
    I am trying to consume a Calculation view (sql script one) , which has input parameters, via Native SQL in a ABAP program .
    Code snippet for the same would be as follows , Upon execution, it throws an error "Invalid Column Index (8) error " . Can anyone help what could be the issue here ?
    Thanks in Advance,
    Suma
    REPORT ZTEST_HANA2.
    *Report to consume Calculation view (script based) from ABAP
    PARAMETERS: ip_docnr type BELNR_D,
                ip_gjahr type GJAHR,
                ip_bukrs type BUKRS,
                ip_blgr type FAGL_RLDNR.
       DATA: LO_SQL_STMT TYPE REF TO CL_SQL_STATEMENT,
              LO_CONN     TYPE REF TO CL_SQL_CONNECTION,
              LO_RESULT   TYPE REF TO CL_SQL_RESULT_SET,
              LV_SQL      TYPE STRING,
              LR_DATA     TYPE REF TO DATA.
        DATA: LX_SQL_EXC           TYPE REF TO CX_SQL_EXCEPTION,
              LT_SEPMAPPS_CLSDINV  TYPE TABLE OF SEPMAPPS_CLSDINV,
              LV_TEXT              TYPE STRING.
        TRY.
    lv_sql = |SELECT * FROM "_SYS_BIC"."DEMO-ABAP/CA_GET_FI_DATA" | &&
                     |WITH PARAMETERS ('placeholder'= ('$$p_DOCNR$$','{ ip_docnr }'),| &&
                      |'placeholder'=('$$p_GJAHR$$','{ ip_gjahr }')| &&
                      |,'placeholder'= ('$$S_BUKRS$$','{ ip_bukrs }')| &&
                      |,'placeholder'= ('$$p_base_ledger$$','{ ip_blgr }') )| .
             LO_CONN = CL_SQL_CONNECTION=>GET_CONNECTION( ).
             "Create an SQL statement to be executed via the connection
              LO_SQL_STMT = LO_CONN->CREATE_STATEMENT( ).
             "Execute the native SQL query
             LO_RESULT = LO_SQL_STMT->EXECUTE_QUERY( LV_SQL ).
             "Read the result into the internal table lt_sepmapps_clsdinv
             GET REFERENCE OF LT_SEPMAPPS_CLSDINV INTO LR_DATA.
             LO_RESULT->SET_PARAM_TABLE( LR_DATA ).
             LO_RESULT->NEXT_PACKAGE( ).
             LO_RESULT->CLOSE( ).
             LO_CONN->CLOSE( ).
        CATCH CX_SQL_EXCEPTION INTO LX_SQL_EXC.
             LV_TEXT = LX_SQL_EXC->GET_TEXT( ).
             MESSAGE LV_TEXT TYPE 'E'.
        ENDTRY.

    Hi Suma,
    Post the SQL you success run directly on Studio together with error message (even if is the Invalid column index error).
    Check there if the parameters case is working properly... Is it really this confusing options:
    p_GJAHR
    S_BUKRS
    p_base_ledger
    Why not all lower or all upper? Anyhow you must test and find which option works according your modeling
    Regards, Fernando Da Rós

  • Named Pipes provider, error:40 could not open a connection to sql server. Only happens on one of the front end SRS servers

    when testing a datasource connection I get the following error.
    Named Pipes provider, error:40 could not open a connection to sql server.
    I've read all the posts on this and nothing works.  This is a scale out deployment and the connection
    works from the other server I have setup with SRS that is connected to the same backend SRS databases.  It just doesn't work from one of the SRS front ends.  I'm at a loss..  please help

    Enable both named pipe and TCP communications.
    Make sure client is using the same (named) pipe name as server for connection.
    Kalman Toth Database & OLAP Architect
    Free T-SQL Scripts
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Reporting Services 2008 R2 configuration error: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi, I am using SQL Server 2008 R2 and on one of our dev boxes I am trying to setup ReportServer using ReportingServices Configuration manager. This is was installed longtime back and during installation they created a service account for reporting services.
    When I try to configure the service account I do not get the service account created during the installation in the pull down and if I were to use something different I get this "Named Pipes Provider, error: 40 - Could not open a connection to SQL Server"
    error.
    Thanks in advance...........
    Ione

    Hi,
    Take a look at this blog - http://blogs.msdn.com/b/sql_protocols/archive/2007/03/31/named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server.aspx
    I hope it will help.

  • Invalid Column Index Error

    Hi all,
    I am trying to create a new report using
    1. Crystal Report XI
    2. Oracle 9i
    3. A stored Procedure
    4. JDBC connection.
    But i could not do it.
    Invalid Column index error is coming.
    Can anyone help.
    Thanks
    Saravanakumar.

    I know this is an old thread but I too am getting a column index error accessing an Oracle 10g database stored procedure using Crystal Reports XI, using the New Report wizard to select the stored procedure.  It prompts me for the sp parameters; I select "set to null" and click OK and get
    Failed to retrieve data from the database. Details:  SQL Exception: [SQL State:] null [Error message:] Invalid Column Index [Database vendor code 17003]
    I can run the procedure and get data just fine with no errors using PL/SQL.

  • Re: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

    Hi,
    I'm encountering an issue with "Named Pipes Provider, error: 40 windows" and am having problems determining how to fix it due to the environment I'm using.  I have two SQL Servers installed on two separate Win2K3 Server boxes, one is SQL Server 2000 and the other is SQL Server 2005.  The SQL Server 2000 contains the actual application data.  The 2005 database is used only for Reporting Services.  I've set up the reports on SSRS such that their datasources hit the 2000 server.  This is using SQL Server authentication.
    When testing the reports via SSRS (in Visual Studio 2005), the connection to the data works and the reports are generated fine.  When I deploy them to the reporting server and launch IE to test locally (still on the 2005 box), I get this "Named Pipes Provider, error 40" issue.  I made sure that Named Pipes and TCP were enabled and the port set at 1433 (to match that on the 2000 box). 
    Now I changed the datasource's authentication from SQL Server to Windows authentication.  I tested this in SSRS and this works too.  When I redeployed the reports with this authentication change, testing the reports via IE locally (on the 2005 box) worked.  Great.  Now when I open IE on an external box, i.e. on the 2000 box, and try to test the reports, I get this same error 40 issue.  I've been through a few threads describing the error 40, fiddling around with the SQL Server configuration as well as SSRS, to no avail.  I have a feeling this error 40 issue has to due with permissions/authentication between the SQL Server boxes but I can't really be sure.  Anyone have any ideas on how to troubleshoot my situation.  Thanks.
    larry

    Named Pipes Provider, error: 40 - Could not open a connection to SQL Server :
    I.   Incorrect connection string, such as using SqlExpress.
    Check out: http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=558456&SiteID=17
                    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1245564&SiteID=1
    The typical error when dealing with Express includes:
    a.  User is not aware of SqlExpress was installed as a named instance, consequently, in his/her connection string, he/she only specify ".","localhost" etc instead of ".\SqlExpress" or "<machinename>\Sqlexpress".
    b. Np was disabld by default after installing SqlExpress.
    c. If Sqlexpress was installed on the remote box, you need to enable remote connection for Express.
    Please read the following blog for best practice of connecting to SqlExpress.
    http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx
    II. Named Pipes(NP) was not enabled on the SQL instance.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=136253&SiteID=1
    Oppose to SQL 2000 which turn on all protocols, SQL 2005 SKUs turn off NP by default. So, when you see this error, please check:
    1) Go to SQL Server Configuration Manager, See Server has NP enabled.
    2) %windir%\program files\microsoft sql server\mssql.1\mssql\log, notepad ERRORLOG, see whether Server is listening on NP.  You should see "Server named pipe provider is ready to accept connection on [ \\.\pipe\sql\query ] or [\\.\pipe\mssql$<InstanceName>\sql\query]"
    3) Notice that "sql\query" is the default pipe name, so you need to know server is listening on which pipe name. eg: if you specify server pipe name is "sql\query1", then you would see in the errorlog that server listening on [ \\.\pipe\sql\query1 ], and go to SQL Server Configuration Manager, click client Named Pipe properties, see whether the pipe name is same with the one server listening on.
    4) If you are using SQL Native Client ODBC/OLEDB provider({SQL Native Client} or SQLNCLI), go to SQL Configuration Manager, click client protocols, make sure NP and TCP are both enabled. Right click properties of NP, make sure client is using the same pipe name as server for connection.
    5) If you are using MDAC ODBC/OLEDB({SQL Server} or SQLOLEDB) provider, in command line, launch "cliconfg.exe" and make sure NP enabled and right pipe name specified.
    III. Remote connection was not enabled. 
    Check out: when you right click on the Server in SQL Server Management Studio, in Connections, the Remote server connections part, you have enabled the "Allow remote connections to this server" check box
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=322792&SiteID=1
    https://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=763875&SiteID=1
    If you are making a remote connection, namely, your target SQL Server is on the different box as client application, you might need to check whether:
    a. "File and Printer Sharing" was opened in Firewall exception list.
    b. Please see the blog for enabling remote connection for express and troubleshooting tips of remote connection.
    http://blogs.msdn.com/sql_protocols/archive/2005/11/14/492616.aspx
    http://blogs.msdn.com/sql_protocols/archive/2006/09/30/SQL-Server-2005-Remote-Connectivity-Issue-TroubleShooting.aspx
    IV. Server not started, or point to not a real server in your connection string.
    Check out: Open SQL Server Surface Area Configuration and ensure all the required services are started, Remote Connections are configured.
    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=348662&SiteID=1
    a. use "sc query mssqlserver" for default instance or "sc query mssql$<instancename>" to make sure SQL Server was started. Sometimes, reseason behind the broken of your client application w/ this error:40 might be SQL server restarted and failed, so, it'd better for you to double check.
    b. User specified wrong server in their connection string, as described in the forum discussion, "MSSQLSERVER" is an invalid instance name. Remember, when you connect to default instance, <machinename> could be best representitive for the instance, when you connect to a named instance such as sqlexpress, you should specify <machinename>\<instancename> as data source in your connection string.
     V. Other reasons such as incorrect security context.
    Check out: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=192622&SiteID=1
    Such error also occured during user operation such as moving database or db mirroring or cluster, any DB OP that might invovle different sql instances, namely, the destination database is located in another sql instance and user is not aware of the state of the destination. I recommend you first isolate whether this fail is during connection stage or data operation stage.
    a. During data operation, you are normally asked to type in the destination server name whether it is default to "(local)" or another server "<remotemachinename>". So, remember the exact string that represent the target instance, then when the error repros, open command line, use "sqlcmd -S<representitive> -E" ,see what happens, if the connection fail, please follow up above I - IV troubleshooting lists. otherwise continue.
    b. If you can make basic conection, but still face the error, then there must be something that server reject the connection or client close the connection for some reason.
    VI. Please try basic connectivity tests between the two mahcines you are working on. One simple way to verifty connectivity is to use command line tools, such as osql.exe. For example, osql -E -Stcpervername\instancename. If it connects cross-machine successfully, please also verify that your connection string in your scenario is correct.
    Here are some blogs which could be helpful: just follow the basic connectivity troubleshooting guidelines on the SQL Protocols blog, see:
    SQL Server 2005 Connectivity Issue Troubleshoot - Part I
    http://blogs.msdn.com/sql_protocols/archive/2005/10/22/483684.aspx
    and
    SQL Server 2005 Connectivity Issue Troubleshoot - Part II
    http://blogs.msdn.com/sql_protocols/archive/2005/10/29/486861.aspx
    Hope this helps.

Maybe you are looking for

  • Installing photoshop elements 12

    I have tried several times to install this program- i have downloaded both files (.7z & exe) to the same folder. exe has installed, but when i try to start the program i get a log in pop up- which i do log in- then the window disappears and nothing h

  • Problem installing Oracle9i Database

    When i installed the software, it got through to almost 50%, but then the installer screen suddenly disappeared off the screen and my pc shut-down and restart automatically. I don't know what was the problem because there wasn't even an error message

  • 10.4.7 or 10.4.6 is incompatible with Xerox XA7-19i LCD display??

    Hello, I've discovered some strange behaviour of my core duo mac mini with Xerox XA7-19i LCD display. This display worked well with 10.4.5, but after my upgrade to 10.4.7 my screen wasblank and only blinked a little bit after booting. The only way wa

  • Database report ....

    I am brand new DBA .... Users wants me to make daily database reports. What should I write in the report .... I have put the alert.log on the report, Tablespace usage, Backup status with RMAN and Long Operation Status (v_$session_longops), but still

  • Panini Scaling Question

    Hello, Firstly, great product! And Panini is already an excellent leap forward. I'm curious about how to give an asset in my layout the characteristics of the "noBorder" StageScaleMode constant from within Catalyst (or builder, as the case may be). S