Pagination incorrect in Named Column reports
I create a Named Column report template and a report based on that template.
Everything ok but pagination
- First page displayed correctly
- Click Next page button, second page displayed but first page still there, it's not hidden,
there's two page navigation panels
Any help ?
Here's the link
http://apex.oracle.com/pls/otn/f?p=37181:10
Similar Messages
-
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!
RichHi 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/ -
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,
SamSam,
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 -
Sorting on columns with templated Report -- Named Column (row template)
Hi forum,
I'm trying to duplicate a regular report's column sorting functionality in a "Named Column" report.
The column headers are in the "Before first and after last row text" "Before Rows" area of the template :
<th onClick="sortByColumn('#REGION_ID#',5)">Frequency</th>invoking this javascript:
function sortByColumn(regionId,colNo) {
var u = "f?p=124:401:&SESSION.:fsp_sort_" + colNo + "::RP&fsp_region_id="+regionId.substring(1);
document.location.href=u;
}I'd like to sort descending when a user clicks the column again, and to display the column sort arrows (up/down).
However, since sorting is persisted per user, even when the page's cache is cleared, it would be necessary to pick up the sort column and order (ascending,descending) on page load or query it later using ajax, so that the sort display (the arrows) stays in synch with the actual sort.
Has anyone got an idea how to do this?
Cheers
Edited by: YT on Apr 1, 2009 4:19 PM
Edited by: YT on Apr 1, 2009 4:24 PM
Edited by: YT on Apr 1, 2009 4:26 PMHi,
Sort ordering on reports are stored as user preferences - see Need to do column SORTING only when I click the column heading for Denes' example on how to use this
Andy -
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>
&lHello 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. -
Helllo,
I"m using Application Express 3.1.2.00.02
I want to do a 3 columned report.
I just saw this thread ( from 2005 - that's why I started a new)
Multi-columned report
When I applied the template to my report region, I got the following error:
ERR-1025 Erreur lors du traitement de l'expression PL/SQL. mod(1,3)0
Can someone tell me why?
thanks,
Roseline
My Query - select ename from emp
The template I created step by step:
Create a report row template....
Workspace>Builder-Application>Shared Components>Themes>Templates...Create
Template Type: Report
Creation Method: From Scratch
Name: One Field - Three Column
Theme: your choice
Template Class: Standard
Template Type: Named Column (row template)
Edit the report Template you just created and modify the following:
Row Template 1: <td width="150">#1#</td>
Row Template Condition: Use Based on PL/SQL Expression
Row Template 1 Expression: mod(#ROWNUM#,3)0
Row Template 2: <td width="150">#1#</td></tr><tr>
Row Template Condition: Use Based on PL/SQL Expression
Row Template 2 Expression: mod(#ROWNUM#,3)=0
Before Rows: <tr>
After Rows: </tr>
Create a query based report region. For my test I used "select ename from emp". Have the report use the row template.
This is just a quick and dirty sample. For better look and feel you'll need to do your own formatting...Yes, that's it.
However, that I SEE is only 4 name ( every 3 name of the list) on the same line:
ENAME WARD ENAME BLAKE ENAME KING ENAME JAMES
1 - 14 But when I cut and paste from Internet Explorer to a text file,m=, even if I see all the result on the same line, when I past it, it's formated :
ENAME WARD
ENAME BLAKE
ENAME KING
ENAME JAMES
1 - 14
I have 14 results in my database:
In My SQL
select * from emp
EMPNO ENAME JOB MGR SAL DEPTNO
7369 SMITH CLERK 7902 800 20
7499 ALLEN SALESMAN 7698 1600 30
7521 WARD SALESMAN 7698 1250 30
7566 JONES MANAGER 7839 2975 20
7654 MARTIN SALESMAN 7698 1250 30
7698 BLAKE MANAGER 7839 2850 30
7782 CLARK MANAGER 7839 2450 10
7788 SCOTT ANALYST 7566 3000 20
7839 KING PRESIDENT - 5000 10
7844 TURNER SALESMAN 7698 1500 30
7876 ADAMS CLERK 7788 1100 20
7900 JAMES CLERK 7698 950 30
7902 FORD ANALYST 7566 3000 60
7934 MILLER CLERK 7782 1300 10
What I would like, is having this display:
SMITH ALLEN WARD
JONES MARTIN BLAKE
CLARK SCOTT KING
TURNER ADAMS JAMES
FORD MILLER
How can I modify the template?
thanks again Roseline -
Is there a 100 column report limit and/or a problem editing dynamic reports
APEX Gurus
I have a report which is generated dynamically, the source being a PL/SQL function body returning SQL query. The on-screen output is generated using mod plsql, i.e. an html table.
If I run the report with parameters which return more than 100 columns, all are displayed on screen
However, if I click on the (standard functionality) 'export to csv' link at the bottom of the report, not all of the columns are exported.
If I navigate to the report definition page, firstly a pop-up error appears: "A Runtime Error has occurred. Do you wish to debug? Line 272 Error: ';' Expected". If I click 'no' then the report definition appears. There are 100 columns listed 'Col01', 'Col02', 'Col03' ... 'Col100'.
I can't edit anything on the page without getting an error when I apply changes:-
ORA-20505: Error in DML: p_rowid=107779820132310508, p_alt_rowid=ID, p_rowid2=79506526374684203, p_alt_rowid2=SECURITY_GROUP_ID. ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "E8F1BCECF94FAD8DF3ECC3E74BCC4D50" application checksum = "0"
ORA-20505: Error in DML: p_rowid=107779820132310508, p_alt_rowid=ID, p_rowid2=79506526374684203, p_alt_rowid2=SECURITY_GROUP_ID. ORA-20503: Current version of data in database has changed since user initiated update process. current checksum = "E8F1BCECF94FAD8DF3ECC3E74BCC4D50" application checksum = "0"
The only option is a hyperlink to go back: 'Return to application'. No changes are saved.
I am wondering if I am hitting 2 problems:-
1. APEX can't handle more than 100 columns
2. APEX can't handle editing of the page once it has been created?
Does anyone have any good ideas/seen this before?
Could it be related to this Is it a bug (Form with more than 100 items/columns) ?
Is this a bug or an undocumented feature?
All help appreciated.
IanI created a report with the following query
SELECT 1,2,3,4,5,6,7,8,9,10,
11,12,13,14,15,16,17,18,19,20,
21,22,23,24,25,26,27,28,29,30,
31,32,33,34,35,36,37,38,39,40,
41,42,43,44,45,46,47,48,49,50,
51,52,53,54,55,56,57,58,59,60,
61,62,63,64,65,66,67,68,69,70,
71,72,73,74,75,76,77,78,79,80,
81,82,83,84,85,86,87,88,89,90,
91,92,93,94,95,96,97,98,99,100
FROM DUAL
{code}
It created a 100 column report and I was able to manipulate the report the same as any other. So maybe it is not the fact that there are 100 columns. I know its not an answer to your question but maybe it can help.
Tyson Jouglet
Edited by: Tyson Jouglet on Oct 13, 2008 8:51 AM -
Column report for purchase and sales
Dear Experts
I would like to create column report like Doc No, Item Description, vat 4%, VAT 12.5%, CST 2%, BED, CESS, HRCESS.
The above mentioned report has to made tax wise purchase and sales.
What is the table i have to take please help me.Hi Asupathy Raja,
Check the thread
Report -list of all the purchases - TAX Catg.wise/ Item Group wise
*Close the thread if issue solved.
Regards
Jambulingam.p -
Multi Column Report - printing Across and then Down
Is there any setup option for a multi column report to go across and then down instead of down & across as a default. The problem I am experiencing is that some where and some how the two columns are not horizontally aligned properly - neither in the
report view nor in the exported PDF.
The added difficulty is the problems created by this misaligned labels while printing on a custom paper that is smaller in size. Though I can setup the custom dimensions and get the desired 4x2 labels on the screen the printing doesn't sit in proper places
on a preformatted paper.
Is there any solution(s). Thanks in advance.Hi Christal,
Based on my understanding, you want to make multi columns go across then down in the report.
For your requirement, on query level, we should add an additional field(DisplayColumn) in the dataset, the field indicates the column in which the corresponding records will display. When designing a report, we add a group in the report, then insert some
tablixes into the detail row. Within the nested tablix, we specify filter expression based on the value of DisplayColumn field. So that we can decide which data should display on which column. When previewing the report, you can find the report displays like
newsletter-style. Besides, if we design the report like this, the report can supports all renders. For detail information about how to design the report step by step, please refer to this article:
Creating Multiple-Column Reports [SSRS] .
If you have any question, please feel free to ask.
Best regards,
Qiuyun Yu
Qiuyun Yu
TechNet Community Support -
Is it possible to change values in pagination select list for a report?
The values showing up in my pagination select list for a report are 10,15,20,30,50,100,200,500,1000,5000.
Is it possible to not have this list show the 1000 and 5000 values? I've tried setting various row values in the layout and pagination section of the report, but nothing changes in the select list. Is there a way to change this, or is it set up in a template somewhere that I can change?
APEX version 3.0
ThanksFigured this one out. Using the P1_ROWS item, added a static LOV with the correct values to override the one APEX was providing. The P1_ROWS item goes in the Number of Rows (Item) field in the layout and pagination section of the report.
-
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 .
CosHi Cos2008,
Glad to hear that you issue had been solved. Thank you for your sharing.
Regards,
Charlie Liao
TechNet Community Support -
Changing details layout for a multi column report
I have a report that contains linked 2 subreports. The report has a details layout width of 2.5 inches which will create a 3 column report (Format groups with multiple columns is checked) . This works fine for my first subreport as it is small enough to fit that width. However that isn't enough room for my second sub report. Ii need to change the details layout width from 2.5 inches to 3.5 for a 2 column report then back again when that section is finished. Is this possible?
i believe you can depends on where you place you subreports
insert a 2nd group under the first, place 2nd report in the new details section
in the section expert next to the details section check off underlay.
this will lay them out next to each other but grow independetly -
Multi Columns Report Switch replacement
Hi, I have a multiple columns report with 2 fix columns and 10 selectable ones.
I'm selecting the columns with a checklistbox an it works
The Header is easy just have to put "=Parameters!Columns.Label(0-10)" as an expression in each columns heading
The hard part that I'm not getting is that I'm currently using a Switch statement in the fields values and I want to put it into Custom Code.
Why Custom Code is that I was ask to insert 15 other fields value in my selection list. I just don't want to be ask to add more fields x 10 columns.
Here's part of my Switch, I have 10 of them (0-10) for each columns.
=Switch(Parameters!Columns.Value(0)="Phone"
,Fields!Phone.Value,
Parameters!Columns.Value(0)="FirstTime"
,SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value),
Parameters!Columns.Value(0)="ProcessTime"
,SSRS.Utility.TimeFromMilliSeconds(Fields!ProcessTime.Value),
Parameters!Columns.Value(0)="TalkTime"
,SSRS.Utility.TimeFromMilliSeconds(Fields!TalkTime.Value),
Parameters!Columns.Value(0)="Transferred"
,Fields!Transferred.Value)
Notes that some of the fields are FIELDS and others are call in function (assembly's)
Here's one of my many variation of custom code
Public Shared Function FixColumns(Byref Colonne as String) As String
SELECT CASE Colonne
CASE "Phone"
Return "Fields!Phone.Value"
CASE "FirstTime"
Return "SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value)"
END SELECT
End Function
in the value columns fields
=CODE.Fixcolumns(Parameters!Columns.Label(0))
I would greatly appreciate any help
Denis B.Hi Denis B,
If I understand correctly, you want to use custom code replace Switch expression in your report. Please refer to the following custom code:
Public Shared Function FixColumns(Byref Colonne as String, A as String, B as String, …… , F AS String) as String
Select Case Colonne
Case "Phone"
Return A
Case "FirstTime"
Return B
Case Else
Return F
End Select
End Function
Then, we can use following expression to calculate the values:
=CODE.Fixcolumns(Parameters!Columns.Label(0), Fields!Phone.Value, SSRS.Utility.TimeFromMilliSeconds(Fields!RingTime.Value), …… , Fields!Transferred.Value)
As per my understanding, Return Statement in a Function, Get, or Operator must return a value, we cannot return an expression via custom code. So, we use this fields or assembly as a variable in the custom code.
Hope this helps.
Regards,
Alisa Tang
If you have any feedback on our support, please click
here.
Alisa Tang
TechNet Community Support -
I am using the Crystal Reports edition bundled with Visual Studio 2005. I have a problem with a multi-column report. It is a two column member directory with family members. It lists the member name, contact info, spouse, and children. I want each family group to stay together, and not break cross a column or a page. Each group may have from 3 to a dozen or so lines.
The family groups will not break across a page (which is good), but they will break across a column (bad). I have tried many combinations of settings to make this work without success.
So I wonder if anyone has seen and resolved this problem, or if perhaps it works better in the full version of Crystal.In some sub-sections, I have checked 'Suppress Blank Section' checked. In others, I have a suppression formula.
Each section has only a single field.
The record set that the report uses has a single row for each person. The sorting and grouping is arranged so that the first record in each family group is the 'main' member. The report displays this person's name, and also shows the sections which include address and phone number info. Subsequent records are for family members (spouse and/or children). For these records, I display the name, but suppress the address and phone sections.
There is also a detail sub-section used as a group header. This group breaks when the first letter of the last name changes, so it an display a single letter heading ("A"). I had tried this as a regular group header too, but it didn't help.
I have tried combining all the sections into a single one with each field on a separate line (which means the section can have some blank space), and also combined into a text box. No luck.
I also have the group itself set to "Keep Together' in the group expert. Doesn't help/ -
Use XML stored in the DB with an Named Columns (XSL-FO) report layout
Hi Folks.
Here's my 'challenge' du jour.
I have an XML document saved in the database.
It was uploaded through APEX (form with report) into a table where the column holding the XML file is defined as "SYS"."XMLTYPE"
I have an XSD file which I am using as the report template definition.
my report query is
SELECT xml_data
FROM xml_documents
WHERE filename = 'test.xml'When I run the report in APEX stating "Use Generic Report Layout" I get a PDF stating [unsupported data type]
Does anyone have any pointers/suggestions?
I have downloaded Apache FOP 0.95 and have succesfully converted the XML into a PDF using the XSL file. Consequently I know that the XML and XSL documents I am using are 'well formed'.
Many thanks
Kind regards
Simon Gadd
Edited by: Simon Gadd on Mar 23, 2009 6:29 PMJust as a follow up, I have come to the logical conclusion that the APEX report query is expecting you to pull back a regular data set from a SQL query.
This can then be parsed with an XSL format report layout. It's not expecting you to pull complete XML out of the database.
Am I right?
Simon
Maybe you are looking for
-
Ical alarm keeps trying to open file from old location
I have an iCal alarm to open an accounts file each day. I moved the file to another folder, and selected the new location iniCal. It always gives me this: Could not open file because 'Old/Path/to/File' could not be found. When I look at the alarm se
-
Manually execute a povisioning task for a user in OIM 11g
Experts, In OIM 11g, I would like to execute a resource provisioning task for a user thru OIM admin console. In OIM 10g, when we select a resource profile for a user, it used to show the list tasks that are executed. There we can add a new task to ru
-
I have a new MacBook Air with Yosemite (no CD/DVD capacity). I want to install Photoshop Elements 6. Can I do this with the serial number? If pse 6 is not compatible, can I upgrade to pse 7. I do not need pse 12 or 13
-
Touch screen calibration on Stream 8 5801TW
I just udate the drivers of tablet, and after update touchscreen calibation is totally out, I even tried windows calibation tool, which asked me to touch cross signs around the display, but still it does not help. At the moment Im using a usb mouse
-
Keychain have diseapeared!
Hi there, When trying to save a secure note or saving a password (mail account), I was getting an error message saying "cannot find the file". I have tried using the keychain first aid but, the verification failed and I am getting the following messa