No output for XML Publisher Report using CASE/DECODE in Where Clause

Hi,
I've a business requirement to modify an existing report which has two input parameters,
-> p_statcode (Closed Status) which can have values 'Y' or 'N'
-> p_overdue (Overdue Flag) which can have values 'Y' or 'N'
The Overdue Flag is an evaluated column having values of Y/N and it is evaluated as follows,
ONTF_MOD_VAL(NVL (
                                     (TRUNC (SYSDATE)
                                      - (TO_DATE (oe_order_lines.attribute18,
                                                  'DD-MON-RRRR')
                                         + TO_NUMBER (fnd_lookup_values.meaning))),
                                     0
                        overdue_flagThe user requirement now is they needs to be a third option for parameter p_overdue called ALL,
passing which the output should include records having
p_statcode is Y ELSE p_statcode is N AND p_overdue is Y OR p_overdue is N
In other words records having both Y and N vlaues for Overdue Flag have to be returned irrespective of the value given to Closed Status.
Original where clause in the Data Definition file is as follows,
WHERE Closed_Status = nvl(:p_statcode,Closed_Status)
                   AND overdue_flag = nvl(:p_overdue,overdue_flag)My modified code is as follows,
WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
         AND overdue_flag = (CASE
         WHEN :p_overdue = 'Y' THEN 'Y'
         WHEN :p_overdue = 'N' THEN 'N'
         ELSE overdue_flag
         END)
OR
WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
         AND overdue_flag = DECODE (:p_overdue, 'Y', 'Y', 'N', 'N',overdue_flag)Both approaches have the same problem.
The output is in EXCEL format. The modified query works fine for p_overdue as Y or N but when p_overdue is passed as ALL it returns an empty EXCEL sheet with just the report output column headers.
Any help as to why this is the case ?? What is wrong in my approach ?
Regards,
Vishal

not clear about p_overdue = ALL
which values needed for p_overdue = ALL ?
try smth like
WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
AND (
   overdue_flag = DECODE (:p_overdue, 'Y', 'Y', 'N', 'N',overdue_flag) and :p_overdue != 'ALL'
   or
  :p_overdue = 'ALL' and (overdue_flag = 'Y' or overdue_flag = 'N')
)for overdue_flag which has more then 'Y', 'N' values
if overdue_flag only in ('Y','N') then
WHERE   Closed_Status = NVL (:p_statcode, Closed_Status)
AND (
   overdue_flag = DECODE (:p_overdue, 'Y', 'Y', 'N', 'N',overdue_flag) and :p_overdue != 'ALL'
   or
  :p_overdue = 'ALL'
)

Similar Messages

  • Getting OPP LOG Error for XML Publisher report

    Hi Experts
                               We are facing warning message for Xml Publisher report  please advise how can we avoid this warning message.
    {code}
    Post-processing of request 12345678 failed at <sysdate> with the error message: The Output Post-processor is running but has not picked up this request. No further attempts will be made to post-process this request, and the request will be marked with Warning status. Setting the profile option Concurrent: OPP Response Timeout to a higher value may be necessary
    {code}
    We have increased the Profile value for
    Concurrent: OPP Process Timeout  from 120 to 240 still we are facing the issue even we have  stop and restart the OPP for the change to be implemented but no luck please advice me
    Thanks
    AT

    Hi,
    Please see the following notes:
    The Output Post-processor Is Running But Has Not Picked Up This Request. (Doc ID 1547102.1)
    Concurrent Requests Fail Due to Output Post Processing (OPP) Timeout (Doc ID 352518.1)
    Report Output Error: The XML page cannot be displayed. Cannot view XML input using style sheet. (Doc ID 753620.1)
    Output Post Processor (OPP) Manager Not Working Error: APPLTMP Environment Variable is not Set (Doc ID 1381474.1)
    R12: Troubleshooting Known XML Publisher and E-Business Suite (EBS) Integration Issues (Doc ID 1410160.1)
    Thanks &
    Best Regards,

  • Getting OPP  Error for XML Publisher report

    Hi Experts
                               We are facing warning message for Xml Publisher report  please advise how can we avoid this warning message.
    {code}
    Post-processing of request 12345678 failed at <sysdate> with the error message: The Output Post-processor is running but has not picked up this request. No further attempts will be made to post-process this request, and the request will be marked with Warning status. Setting the profile option Concurrent: OPP Response Timeout to a higher value may be necessary
    {code}
    We have increased the Profile value for
    Concurrent: OPP Process Timeout  from 120 to 240 still we are facing the issue even we have  stop and restart the OPP for the change to be implemented but no luck please advice me
    Thanks
    AT

    Hi,
    Please see the following notes:
    The Output Post-processor Is Running But Has Not Picked Up This Request. (Doc ID 1547102.1)
    Concurrent Requests Fail Due to Output Post Processing (OPP) Timeout (Doc ID 352518.1)
    Report Output Error: The XML page cannot be displayed. Cannot view XML input using style sheet. (Doc ID 753620.1)
    Output Post Processor (OPP) Manager Not Working Error: APPLTMP Environment Variable is not Set (Doc ID 1381474.1)
    R12: Troubleshooting Known XML Publisher and E-Business Suite (EBS) Integration Issues (Doc ID 1410160.1)
    Thanks &
    Best Regards,

  • FO processing for XML Publisher Report Bursting Program

    Hello,
    I am facing the following problem: if i try to burst a report using XML Publisher Report Bursting Program special characters like (ş,ţ,ă, etc.) in the resulting PDF look strange. I have tried running the report without bursting it and the characters appear just fine (after i've set the FO Processing Font Mapping). My guess is that XML Publisher Report Bursting Program is not using the right font mapping. Have you faced this problem before? Do you have any idea how to set the right font mapping for XML Publisher Report Bursting Program.
    Thank you.

    So the answer was to make sure the location in the bursting file (location="xdo://schema.template_code.en.US) exactly matches the language/country setting in the uploaded Definition. Then make sure the fonts have been added to the xdo.cfg file matching what your Font Mappings are:
    <font family="Cambria" style="normal" weight="normal">
    <truetype path="/app/erp1/applmgr/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/fonts/CAMBRIA.TTC" />
    </font>
    <font family="Cambria" style="normal" weight="bold">
    <truetype path="/app/erp1/applmgr/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/fonts/CAMBRIAB.TTF" />
    </font>
    <font family="Cambria Bold" style="normal" weight="bold">
    <truetype path="/app/erp1/applmgr/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/fonts/CAMBRIAB.TTF" />
    </font>
    <font family="Cambria Bold" style="normal" weight="normal">
    <truetype path="/app/erp1/applmgr/apps/tech_st/10.1.3/appsutil/jdk/jre/lib/fonts/CAMBRIAB.TTF" />

  • I need 3 dimentional charts as an output in xml publisher report

    Hi,
    As off now chrarts r in 2 dimension But I need 3 dimentional charts as an output in xml publisher report, please any one tel me wheather is possible or not.....?? if possible please tell me how to develop that report....

    Not sure you are on the right forum...

  • How to use CASE stmt in Where clause

    Hi,
    How to use CASE stmt in WHERE clause?. I need the code. Please send me as early as possible..........

    Hi,
    1004977 wrote:
    Hi,
    How to use CASE stmt in WHERE clause?. There's no difference between how a CASE expression is used in a WHERE clause, and how it is used in any other clause. CASE ... END always returns a single scalar value, and it can be used almost anywere a single scalar expression (such as a column, a literal, a single-row function, a + operation, ...) can be used.
    CASE expressions aren't needed in WHERE clauses very much. The reason CASE expressions are so useful is that they allow you to do IF-THEN-ELSE logic anywhere in SQL. The WHERE clause already allows you to do IF-THEN-ELSE logic, usually in a more convenient way.
    I need the code.So do the peple who want t help you. Post a query where you'd like to use a CASE expression in the WHERE clause. Post CREATE TABLE and INSERT statements for any tables used unless they are commonly available, such as scott.emp). Also, post the results you want from that sample data, and explain how you get those resuts from that data.
    See the forum FAQ {message:id=9360002}
    Please send me as early as possible..........As mentioned bfore, that's rude. It's also self-defeating. Nobody will refuse to help you because you don't appear pushy enough, but some people will refuse to help you if you appear too pushy.

  • How to print output of XML Publisher report in different trays of a printer

    Hi All,
    I have a requirement in XML Publisher Report. I need to print all pages other than last one in one tray of a printer and the last page has to be printed in another tray of the same printer.
    Can anyone help me out...
    Thank You..

    I do not think it is possible to send all the pages to one tray and send only the last page to a different tray. However, you may review the following notes:
    Note: 357402.1 - How to Print the Output to a Different Paper Size Using XML Publisher Delivery Manager?
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=357402.1
    Note: 394130.1 - How To Enable Printer Options Such As Duplex Printing Or Tray Selections For Bitmap Concurrent Programs
    https://metalink2.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=394130.1

  • How to create editable PDF template for XML Publisher reports

    Hi,
    I have got a requirement to have some editable fields in one report whose output is in PDF format.
    I tried looking and saw this can be done using the XML Publisher report and using PDF template.
    But I got only Adobe Acrobat Reader and it does not have the facility to create Form fields.. Can you let me know what software I need in order to create the editable PDF Template.
    In the user guide, it didnot mention anything regarding this.
    Can I create editable PDF report using RTF template or do i have to got for PDF template only?
    Any help is appreciated!
    Thanks

    Hi,
    To edit PDF template , u need Acrobat writer, which is not free .
    I am still wondering what is this ?
    "" Can I create editable PDF report using RTF template ?? "".
    What is editable PDF report. ?
    i think what you tried to mention is ,
    can the PDF output from xml publisher is editable ?
    If that is the question , so here is some points,
    If you have Acrobat Writer or prof.edition, you can edit all the PDF documents irrespective of being from where it is generated.
    To make you understand more of XMLP.
    You create RTF template in word, so that , after merging with xml you can have multiple output formats like PDF, XLS, EFT,.....

  • Xml publisher report using RTF in Excel is coming as wrap text?

    Hi,
    I am working on XML publisher report, I have converted standard report to xml publisher , to generate the report in excel.
    But the output is coming as Wrap text, is there a way to get the output directly without wrap ?
    Thanks
    Dev

    Hi Dev,
    You can try below ways
    1>change the setting in table properties to fit table cell as per contents.
    2>or create a table and inside that create one more inner table and add your fields.
    3>or Create .XLS layout it will come properly.
    Thanks

  • Java.io.IOException in OPP for XML Publisher Report

    Hi,
    When we run the XML Publisher report for more data we get an exception in the OPP log as
    [9/27/10 10:26:37 AM] [UNEXPECTED] [1805143:RT102444048] java.io.IOException: There is not enough space in the file system.
    at java.io.FileOutputStream.writeBytes(Native Method)
    at java.io.FileOutputStream.write(FileOutputStream.java:266)
    at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:76)
    at java.io.BufferedOutputStream.write(BufferedOutputStream.java:89)
    at java.io.DataOutputStream.writeInt(DataOutputStream.java:191)
    at oracle.apps.xdo.generator.ProxyGenerator.writeInt(ProxyGenerator.java:613)
    at oracle.apps.xdo.generator.ProxyGenerator.setColor(ProxyGenerator.java:1161)
    at oracle.apps.xdo.template.fo.area.BorderArea.renderBorder(BorderArea.java:775)
    at oracle.apps.xdo.template.fo.area.BorderArea.outBorders(BorderArea.java:206)
    at oracle.apps.xdo.template.fo.area.BorderArea.outBorders(BorderArea.java:147)
    at oracle.apps.xdo.template.fo.area.TableArea.doOutput(TableArea.java:271)
    at oracle.apps.xdo.template.fo.area.BlockArea.doOutput(BlockArea.java:427)
    at oracle.apps.xdo.template.fo.area.NormalFlowReferenceArea.doOutput(NormalFlowReferenceArea.java:58)
    at oracle.apps.xdo.template.fo.area.SpanReferenceArea.doOutput(SpanReferenceArea.java:188)
    at oracle.apps.xdo.template.fo.area.BodyRegionArea.doOutput(BodyRegionArea.java:122)
    at oracle.apps.xdo.template.fo.area.PageArea.doOutput(PageArea.java:666)
    at oracle.apps.xdo.template.fo.area.AreaTree.doOutput(AreaTree.java:483)
    at oracle.apps.xdo.template.fo.elements.FormattingEngine.startLayout(FormattingEngine.java:243)
    at oracle.apps.xdo.template.fo.elements.FormattingEngine.run(FormattingEngine.java:121)
    at oracle.apps.xdo.template.fo.FOHandler.endElement(FOHandler.java:600)
    at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(XSLTHandler.java:594)
    at oracle.apps.xdo.common.xml.XSLTMerger.startElement(XSLTMerger.java:51)
    at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:181)
    at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1288)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:336)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:303)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:205)
    at oracle.apps.xdo.template.fo.FOProcessingEngine.process(FOProcessingEngine.java:307)
    at oracle.apps.xdo.template.FOProcessor.generate(FOProcessor.java:1045)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.runProcessTemplate(TemplateHelper.java:5926)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3458)
    at oracle.apps.xdo.oa.schema.server.TemplateHelper.processTemplate(TemplateHelper.java:3547)
    at oracle.apps.fnd.cp.opp.XMLPublisherProcessor.process(XMLPublisherProcessor.java:259)
    at oracle.apps.fnd.cp.opp.OPPRequestThread.run(OPPRequestThread.java:172)
    [9/27/10 10:26:37 AM] [1805143:RT102444048] Completed post-processing actions for request 102444048.

    Check the error: There is not enough space in the file system.

  • Error for fetching long text in xml tag for xml publisher report

    My requirement is to fetch a large document which is in text format in XML output which can be printed in PDF format by using RTF method to generate PDF.But during XML ouput i got the following error-
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
    button, or try again later.
    The following tags were not closed: XXBG_EAMWRREP_V1, LIST_G_WO_ACTIVITY_CODE, G_WO_ACTIVITY_CODE, LIST_G_MEDIA_ID1,
    G_MEDIA...
    XXBG_EAMWRREP_V1 is the rdf and LIST_G_WO_ACTIVITY_CODE, G_WO_ACTIVITY_CODE, LIST_G_MEDIA_ID1, G_MEDIA are the groups name. In the group
    G_MEDIA i am fetching long_text from attahcment in application. In Database table the datatype of the text attachment is 'long' and there is a huge text
    data loaded in large data editor of that column. If the text data volume is small enough then there is no problem for fetching the xml output.
    If we change the output format as HTMl then there is no problem for fetching the output for long text but for xml output format we are unable to fetch the data
    in xml tag.
    One thing to mention the oracle report is the copy of Maintenance Work Order Detail Report. The seeded report is HTML format in 11i. The requirement is to make it in xml report.
    Please help.

    Hi,
    Actually clob datatype is not available in oracle report builder datatype lov. Could you pls tell the other ways of converting that to clob in oracle report...

  • XML publisher report using connected query

    dear all,
    I defined some XMLP reports with very similiar parameters.
    I found a strange issue, all reports using query as the source, they appear in the XMLP report viewer.
    But for those using the connected query, all are not able to be found in the XMLP report viewer list.
    Anybody has experience on this. Did I miss anything special for the connected query type?
    Many thanks.

    Is there anybody suffering the same issue?
    I double checked the settings of two XMLP report definitions.
    No difference, but the one with the connected query as the source can NOT been found.

  • Using :case when  in where clause

    Hello,
    I need some help with using of case statement in a where clause
    Table that contains info about employees taking some coursework:
    Class (values could be SAP, ORACLE, JAVA)
    Code (if Class is SAP then CODE is not null; if class is any other CODE is NULL)
    Start Date (date they began class not null)
    End Date (date then ended the class - could be null)
    Employee Level(numbers from one through five)
    I need a single LOV in forms that should show Employee_Level for input class,code,date.
    How to do this?
    I started off with this but get 'missing statement error'
    select distinct employee_level from e_course
       where (
       case when &class='SAP' then code ='1' and start_date > to_date('20000101','YYYYMMDD') and
                                               end_date < to_date('20000101','YYYYMMDD')
               else
                   null
       end) order by employee_level;Thanks

    Hi,
    user469956 wrote:
    But all these examples have only one condition for each case.Depending on how you count, all WHERE clauses have only one condition.
    I see an example in that thread that has 6 atomic conditions, linked by AND and OR.
    I need to check date & code. This is what is causing the error.Why do you want to use a CASE statement?
    Why can't you put all your conditions directly iinto a WHERE clause, soemthing like this:
    WHERE   (   &class='SAP'
            AND code ='1'
    OR      (   start_date  > to_date('20000101','YYYYMMDD')
            AND end_date    < to_date('20000101','YYYYMMDD')
            )I said "something like this" because I don't know what you really want to do.

  • How to use case function in where clause

    Hi,
    Suppose a table DEMO has columns
    DEMO TABLE
    user_id
    user_name
    location
    In this table i have 15 users. but out of 15 users i want to use only 5 users for passing as user_name.
    then how to achieve the result
    1. when i pass the particular 5 user_name in where clause then i should get all the user_name and for other 10 users it will show only the passing user_name.
    how to use case function

    Do you mean this ?
    SQL> var name varchar2(10)
    SQL> exec :name := 'ALLEN'
    PL/SQL procedure successfully completed.
    SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
      2  else :name end = ename;
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    14 rows selected.
    SQL> exec :name := 'SMITH'
    PL/SQL procedure successfully completed.
    SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
      2  else :name end = ename;
    ENAME
    SMITH
    ALLEN
    WARD
    JONES
    MARTIN
    BLAKE
    CLARK
    SCOTT
    KING
    TURNER
    ADAMS
    JAMES
    FORD
    MILLER
    14 rows selected.
    SQL> exec :name := 'BLAKE'
    PL/SQL procedure successfully completed.
    SQL> select ename from emp where case when :name in ('SMITH','ALLEN') then ename
      2  else :name end = ename;
    ENAME
    BLAKERgds.

  • Error when using FND FORMAT_CURRENCY for XML Publisher report

    XML_REPORTS_XENVIRONMENT is :
    /apps01/applclone/erpcloneora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    XENVIRONMENT is set to /apps01/applclone/erpcloneora/8.0.6/guicommon6/tk60/admin/Tk2Motif_UTF8.rgb
    Current NLS_LANG and NLS_NUMERIC_CHARACTERS Environment Variables are :
    _AMERICA.UTF8
    stat_low = B
    stat_high = 0
    emsg:was terminated by signal 11
    Program was terminated by signal 11
    Concurrent Manager encountered an error while running Oracle*Report for your concurrent request 3125762.
    Review your concurrent request log and/or report output file for more detailed information.
    Edited by: user11972592 on 20-May-2010 02:30
    Edited by: user11972592 on 20-May-2010 02:46

    I just tried:
    substr(to_timestamp(svs_date, 'dd-mon-yy'),1,9)which crops it but then the interactive searches dont work again so its basically the same as Date. :(
    Mike

Maybe you are looking for

  • File I/O not working in swing!

    Hi all, I have been trying to input certain parameters from a text field or a combobox from the swing UI and certain other contents into a text file.When i click a certain button 'generate'. Basically there are 3 text files namely '1.txt ', '2.txt' ,

  • Process Order Confirmation Issues

    Dear gurus, Can we withdraw componet material which is in inspection lot when we do porcess order confirmation? If so, how can we do that? I mean that which movement type can we use. Any help would be appreciated. Regards, Tiger

  • Accounting Period is null in R12 GL Budget

    Hello all, I am doing budgeting setup in R12. I Defined the Budgeting and created Organization. While entering the Budget amount, I can select Budget and Budget organization but Accounting Periods from fields having no records. Its saying that, FRM-4

  • Skip by default 0000 (Actions) from PA40 and shows any other like 0185.

    Hi Gurus. As you know, in PA40, its run infotype 0000 bydefult before executing any other defined infotype.  I would like to skip 0000 and want to run first 0185 then 0000 and after that any other infotype.  This is because when by default pa40 call

  • Is the EMGC 10g agent compatible with AIX5.2 Netware 5.1, Solaris 8 ......

    We want to install the EMGC 10g agents on different platforms. Are EMGC 10g release 3 agents compatable an installable on these platforms?: AIX 5.2 AIX 5.3 Netware 5.1 Solaris 8 Windows 2000 Server Windows 2003 Server Windows 2000 Professional Regard