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

Similar Messages

  • 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 PM

    Hi,
    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

  • Strange behavior in BI Publisher with long column names from BI Answers

    Hello all!
    I have created a BI Answers request with few calculated columns in form of
    case when <condition> then <value if true> else <value if false> end
    Then in BI Publisher Desktop designed a report ttemplate based on saved BI Answers request and noticed that for calculated columns their names look strange:
    CASEWHEN_<condition>THEN...ELSE..._...END__
    Some of the column names are about 100 characters long.
    After running the report from Word found that for these "long length named columns" there's no data in the output.
    Do someone else experience the same? Any workarounds?
    Regards,
    mr.maverick

    This is because the length for the formula is restricted in publisher. you have to either reduce the size of the column name in answers or change the formula. another workaround is completely pasting the formula directly in the word template instead of placing the formula inside the form field. you can add maximum of 300 characters i guess. you can edit the formula for the form field in the form field options formuals menu.

  • Interactive Report with Null Columns

    I've got a user who wants to export an interactive report, and he needs certain columns to appear on the export for him to fill the data in later (this is an intermediate step, while we work on getting all the data he needs in to the database). I've created the report query, and there are a handful of null/empty columns (to preserve the correct order for the export). When I try to add this query to APEX in an interactive report, I get a "ORA-00001: unique constraint (APEX_040000.WWV_FLOW_WORKSHEET_COLUMNS_UK2) violated" error.
    Googling around shows me that this happens because of similarly-named columns, and the solution is to provide aliases to all columns. My report has aliases on all columns, but I still cannot create an interactive report. I've tried changing the null columns to empty strings, as well as enclosing the aliases in double-quotes, but nothing works. I can however use my original query to create a standard report, but due to the export requirement, this isn't ideal.
    I was able to create the interactive report with one null column, and then edited the report source to add in the others. This had to be done one at a time, since trying to add multiple null columns at the same time gives the same error again. Unfortunately, when I try and run the page, I get an "ORA-20001: get_dbms_sql_cursor error ORA-00918: column ambiguously defined" error.
    My original query:
    select customer.customer_name as customer,
           project.name as project_name,       
           trunc(project.estimated_end_dt) as due_date,
           project_status.project_status_desc as status,
           null as revenue,
           project.baseline_effort as baseline_hours,
           null as projected_cost,
           null as est_gain_loss,
           project.actual_hours as actual_hours,
           project.estimated_hours as projected_hours,
           null as projected_cost,
           null as projected_gain_loss,
           null as roi      
        from project,
             customer
      where customer.customer_id = project.customer_id
      and project.inactive_ind = 0
      and project.customer_id is not null
      and project.estimated_end_dt >= :DTP_P50_STARTDT
      and project.estimated_end_dt <= :DTP_P50_ENDDT
    order by customer.customer_name,
             project.estimated_end_dt;             Can someone tell me a way to create an interactive report with multiple null columns?

    Hi shimmoril,
    The problem is likely that you have two columns aliased as "projected_cost" (7th column and 11th column).
    Hope this helps,
    John
    If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

  • 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

  • When comparing database tables with lob columns via "Database diff" in different environments indexes are shown as different

    When using "Database diff" selecting other schemas only for compare own objects are shown too!Hi!
    For tables with lob columns (clob, blob, etc.) indexes with system names are automatically created per lob column.
    If I am on different database instances (eg. dev/test) these system names can differ and are shown as differences, but these is a false positive.
    Unfortunately there is now way to influence the index names.
    Any chance to fix this in sql developer?
    Best regards
    Torsten

    Only the Sql Dev team can respond to that question.
    Such indexes should ONLY be created by Oracle and should NOT be part of any DDL that you, the user, maintains outside the database since they will be created by Oracle when the table is created and will be named at that time.
    It is up to the Sql Dev team to decide whether to deal with that issue and how to deal with it.

  • 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.

  • Suppress Missing Data not work in web form with formula column inside

    Dear All,
    I've a planning web form with formula column inside to calculate the variance and % variance. But missing cell can't be suppressed, although I've checked the 'Suppress Missing Blocks' and 'Suppress Missing Data' options.
    Anyone have face the same problem..?? and how to fixed it..??
    thanks.
    Regards,
    VieN

    There is a known issue that sounds like the problem you are experiencing
    10358200 - If a formula column exists in a data form, selecting the Suppress missing option does not hide rows that do not contain data.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Columns merged with other columns?

    how do I achieve the following?
    I want to have a tabular form as following
    The first line of the tabular form will only be 3 columns (eg. col1,col2,col3). those three columns will then be broken down into 9 columns (ed. col1 - no column, col2 will have col4,col5,col6, and col7, col3 wil have col8 to col12.) on the second line.
    Any ideas? I know it is possible to do with html but i'm not sure how to process it in APEX

    What I typically do first is to look at a report template from the current theme and see what CSS classes they are using against the tables, headers and rows. I will copy the entries to a text document so I can easily reference them.
    The you create a new report template from scratch and as a Named Column (row template).
    This type template allows you to specify where each column goes by using a substitution variable for the selected column.
    The query I used in the example was
    select ename, job, sal
    from emp
    For the Row Template 1 field under Row Template section, I put
    <tr><td>#ENAME#</td><td>#JOB#</td><td>#SAL#</td></tr>
    In the Before first and after last row text section I put
    1. in the Before rows field
    <style type="text/css">
    table.outln {border-collapse:collapse;}
    table.outln td {border: solid #000 1px;padding:5px;}
    </style>
    <table cellpadding="0" border="0" cellspacing="0" summary="" class="t9standardalternatingrowcolors outln" border="1">
    <tr><th class="t9header" colspan="2">Name / Job</th><th class="t9header">Salary</th></tr>
    2. In the After Rows field
    </table>
    This type of template is REALLY powerful. The only issues that I have run into in the past is that the order of the columns in your query should be the same as the order in which they are used in your row template. I am not sure if it is still an issue, but I have experience issues in the past that when you later change the query and the order is different then the rows are actually put in by position and not by name. To fix that problem I just drop the report and recreate.
    If you happen to have my book by Oracle Press, HTML DB Handbook, there is a good description of this type of template on pages 211- 215.
    The book is a little old now (almost 2 years). Just happened that they renamed HTML DB to ApEx the month before the book was published. It covers ver 2.0, but still has some good info in it.

  • Find size of table with XMLTYPE column STORE AS BINARY XML

    Hi,
    I have a table with structure as:
    CREATE TABLE XML_TABLE_1
    ID NUMBER NOT NULL,
    SOURCE VARCHAR2(255 CHAR) NOT NULL,
    XML_TEXT SYS.XMLTYPE,
    CREATION_DATE TIMESTAMP(6) NOT NULL
    XMLTYPE XML_TEXT STORE AS BINARY XML (
    TABLESPACE Tablespace1_LOB
    DISABLE STORAGE IN ROW
    CHUNK 16384
    RETENTION
    CACHE READS
    NOLOGGING)
    ALLOW NONSCHEMA
    DISALLOW ANYSCHEMA
    TABLESPACE Tablespace2_DATA
    - So HOW do I find the total size occupied by this table. Does BINARY storage work as LOB storage. i.e. I need to consider USER_LOBS as well for this.
    OR foll. will work
    select segment_name as tablename, sum(bytes/ (1024 * 1024 * 1024 )) as tablesize_in_GB
    From dba_segments
    where segment_name = 'XML_TABLE_1'
    and OWNER = 'SCHEMANAME'
    group by segment_name ;
    - Also if I am copying it to another table of same structure as:
    Insert /*+ append */ into XML_TABLE_2 Select * from XML_TABLE_1.
    Then how much space in ROllbackSegment do I need. Is it equal to the size of the table XML_TABLE_1?
    Thanks..

    I think foll query calculates it right while including the LOB storage as:
    SELECT SUM(bytes)/1024/1024/1024 gb
    FROM dba_segments
    WHERE (owner = 'SCHEMA_NAME' and
    segment_name = 'TABLE_NAME')
    OR (owner, segment_name) IN (
    SELECT owner, segment_name
    FROM dba_lobs
    WHERE owner = 'SCHEMA_NAME'
    AND table_name = 'TABLE_NAME')
    It's 80 GB for our Table with XMLType Column.
    But for the second point:
    Do we need 80GB of UNDO/ROLLBACK Segment for performing:
    Insert /*+ append */ into TableName1 Select * from TableName;
    Thanks..

  • Selection in table with Master Column

    Hi,
    can anybody explain me how selection works in table with MasterColumn (TreeByNestingTableColumn)?
    I've created a table with several columns and the "master" one behaves differently from others.
    First of all, leaf elements of master column are not clickable (i.e. I don't receive notification "onLeadSelect" from the table, when user clicks in the cell of leaf element of the column). With expandable elements I receive loadchildren event and can react on selection.
    I'm using TextView as cell editor, will try LinkToAction, may be it will resolve situation, but it's rather workaround as solution
    Second, getLeadSelection doesn't work anymore for the table - it works with indexes of top level elements only.
    However onLeadSelect action brings me selected row number, which I somehow should map to the tree.
    I.e. when I get "25" as selected element, I recursively traverse context node to find 25th element. Which is rather slow operation as for any selection I have to reiterate whole structure and I hope that visual appearance is similar to context element order.
    May be there is simplier ways to get selected element by its index in "flat" list?
    And one another strange thing: first click on the table sends me onLeadSelect "0", but highlight points to the element user clicked - not necessary first one.
    Context node is "single" selection, initLeadSelect=true,
    selection = 0..1 (with 1..1 setTreeSelection doesn't work - method I want to use to be able to select a node in hierarchy on my own)
    all quite similar to other tables I have, which works well. Just the problems with the table, where Master Column is used.
    Thank you!
    Best regards,
    Nick

    >Valery's proposal was to perform reverse traverse from current element to root and summarize parent element indexes.
    It seems to work:
    in method, which sets selection I applied
    // we need to know index of the element not in whole context, but in scope of table-relevant node
    int index = getIndexInContext(selElement, wdContext.currentXXXElement());
    IContextElement curContext = wdContext.currentContextElement();
    int firstVisibleRow = curContext.getTableFirstVisibleRow();
    int visibleRows = curContext.getTableVisibleRows();
    if (index < firstVisibleRow || index > firstVisibleRow + visibleRows) {
    curContext.setTableFirstVisibleRow(index);
    and method getIndexInContext looks as:
        private int getIndexInContext (IWDNodeElement element, IWDNodeElement root) {
              int index = element.index();
              if (element == root) {
                   return index;
              IWDNodeElement parent = element.node().getParentElement();
              if (parent == null) {
    // do whatever you like here for error diagnostic
                   myMsgMgr.reportException("Internal Error: getIndexInContext - element is not under passed root", false);
                   return 0;
              // +1 - every level adds 1 (otherwise indexes of first children of hierarchy will be 0)
              return  index + getIndexInContext(parent, root) + 1;
    Best regards,
    Nick

  • Error while importing a table with BLOB column

    Hi,
    I am having a table with BLOB column. When I export such a table it gets exported correctly, but when I import the same in different schema having different tablespace it throws error
    IMP-00017: following statement failed with ORACLE error 959:
    "CREATE TABLE "CMM_PARTY_DOC" ("PDOC_DOC_ID" VARCHAR2(10), "PDOC_PTY_ID" VAR"
    "CHAR2(10), "PDOC_DOCDTL_ID" VARCHAR2(10), "PDOC_DOC_DESC" VARCHAR2(100), "P"
    "DOC_DOC_DTL_DESC" VARCHAR2(100), "PDOC_RCVD_YN" VARCHAR2(1), "PDOC_UPLOAD_D"
    "ATA" BLOB, "PDOC_UPD_USER" VARCHAR2(10), "PDOC_UPD_DATE" DATE, "PDOC_CRE_US"
    "ER" VARCHAR2(10) NOT NULL ENABLE, "PDOC_CRE_DATE" DATE NOT NULL ENABLE) PC"
    "TFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS"
    " 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "TS_AGIMSAPPOLOLIVE030"
    "4" LOGGING NOCOMPRESS LOB ("PDOC_UPLOAD_DATA") STORE AS (TABLESPACE "TS_AG"
    "IMSAPPOLOLIVE0304" ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 NOCACHE L"
    "OGGING STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEF"
    "AULT))"
    IMP-00003: ORACLE error 959 encountered
    ORA-00959: tablespace 'TS_AGIMSAPPOLOLIVE0304' does not exist
    I used the import command as follows :
    imp <user/pwd@conn> file=<dmpfile.dmp> fromuser=<fromuser> touser=<touser> log=<logfile.log>
    What can I do so that this table gets imported correctly?
    Also tell me "whether the BLOB is stored in different tablespace than the default tablespace of the user?"
    Thanks in advance.

    Hello,
    U can either
    1) create a tablespace with the same name in destination where you are trying to import.
    2) get the ddl of the table, modify the tablespace name to reflect the existing tablespace name in destination and run the ddl in the destination database, and run your import command with option ignore=y--> which will ignore all the create errors.
    Regards,
    Vinay

  • Help with XHTML columns in IE6

    I'm having some problems with my columns in IE6. The math is
    all correct and it lays out perfectly fine in firefox as expected.
    For some reason IE6 seems to be doubling the numbers I assign as my
    margins. Can anyone give me a tip as to what's wrong here before I
    trash this whole idea and go with a old fashioned table.
    2 columns.
    15px left and right margins on the "left" column, 470px wide
    15px right margin on the "right"column, 455px wide

    Its an IE6 float/margin bug. If you add a margin in the same
    direction
    as the float IE6 will double it. Add display: inline; to the
    css styles,
    as below, to counter-act this problem.
    #left { margin: 0 15px; width: 470px; height: 100px; float:
    left;
    background: #f00; display: inline; }
    #right { margin: 0 15px 0 0; width: 455px; height: 100px;
    float: right;
    background: #666; display: inline; }
    quovadimus02 wrote:
    > I'm having some problems with my columns in IE6. The
    math is all correct and
    > it lays out perfectly fine in firefox as expected. For
    some reason IE6 seems
    > to be doubling the numbers I assign as my margins. Can
    anyone give me a tip as
    > to what's wrong here before I trash this whole idea and
    go with a old fashioned
    > table.
    >
    > 2 columns.
    > 15px left and right margins on the "left" column, 470px
    wide
    > 15px right margin on the "right"column, 455px wide
    >
    >
    >
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    > "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="
    http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html;
    charset=iso-8859-1" />
    > <title>Untitled Document</title>
    > <style type="text/css">
    > body { margin: 0; padding: 0; width: 970px; background:
    #e1e1e1; }
    > #wrap { padding: 10px 0; background: #fff; }
    > #left { margin: 0 15px; width: 470px; height: 100px;
    float: left; background:
    > #f00; }
    > #right { margin: 0 15px 0 0; width: 455px; height:
    100px; float: right;
    > background: #666; }
    > </style>
    > </head>
    > <body>
    > <div id="wrap">
    > <div id="right"></div>
    > <div id="left"></div>
    > <div style="clear: both;"></div>
    > </div>
    > </body>
    > </html>
    >

  • Excel Upload with Hidden Column

    Hi Gurus-
    Can you upload Excel file with hidden column and get the function to read values in hidden column? If yes, could you please guide me how?
    I am using ALSM_EXCEL_TO_INTERNAL_TABLE
    Any help will be highly appreciated.
    Thanks in advance!

    Hi,
    Have a look at program RSDEMO01 (available in the controls examples of the workbench). It demonstrates an OLE connection to Excel.
    To know which excel objects, methods and properties to use it is a good idea to use the excel macro recorder - just do what you want your program to do and then translate the resulting VB code to ABAP OLE.
    For the import of the clipboard data you can use CL_GUI_FRONTEND_SERVICES=>CLIPBOARD_IMPORT. In the result table, iirc, there  is one line for each imported line and within the line the cell values are separated by tab. So there is some work left - it might be a good idea t import the data column by column.
    It has been some time when I did this for a former client of me - so unfortunately I do not have the code any more.
    Regards, Gerd Rother

  • ALV Report Output Print issue with more Columns

    Hi Experts ,
                             I'm facing an issue while printing an ALV report which has around 22 columns .If i reduce the column display in the code . I'm able to print but not with 22 columns.. I have used Line-size = 1023 and line-count = 60 , but still the problem persists .
    I also searched in SDN with similar issue but managed to get only the above solution which is not working .
    Any other ways of doing it , kindly suggest .
    Many Thanks,
    Kumaran

    175 characters is the maximum number of characters that can be generated in a line of a spool (next characters are stored on the next line of the spool). When the spool is printed, these line feeds are respected.
    What is possible (I don't know) is that ALV chooses its own format type instead of the format type you have chosen when you run your program in background. To check that, just look at spool attributes (SP01).

Maybe you are looking for

  • I upgraded my RAM but now my MBP loses connection to wireless network in 5-10 minutes - what's going on?

    Hello, This afternoon I installed 16GB of RAM (Patriot brand) into my 2011 Macbook Pro.  When I booted the computer up, everything seemed great until the internet stopped connecting (it did connect at first).  AirPort tells me it is connected to my h

  • Rotate display is gone  from Display-Preferences

    I've had my new MacBook for a week connected to a DVI Samsung 17" LCD monitor. A couple of days ago I lost the portrait mode on the Samsung and checked the Diplay control in System Preferences. The Rotate tool is gone and only "show display in menu b

  • Validation for Cash Payment Rs 20000/-

    Hi friends, There is one way to set the limit on document not exceeding particular value, i.e. by setting limit on the basis of document type. ( since this is client level setting we can not do the same in our scenario ) Is there any other way to do

  • Ordering unit different from invoicing unit

    Hi all, My client procures steel. In PO, they want to buy with ordering unit EA, but when invoicing, they want it in KG (because based on the law here, invoice for steel must be in KG). We suggested them to use ordering unit KG because in SAP, PO uni

  • Photoshop CC Image Asset Generator Save as CMYK?

    The new image asset generator in PSCC is awesome! I wanted to see if it's possible to export image assets as CMYK for print? If not, could it be added as a image as a tag option or perhaps just adhere to the original document settings? Thanks!