Hierachical reports for xml output

Hi,
is there a way to get a SQL result set for the xml export with more than 1 level ?
For example:
SELECT dname, empno, ename
FROM emp, dept
WHERE emp.deptno = dept.deptno
will give me the following xml when being exported:
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<DNAME>ACCOUNTING</DNAME>
<EMPNO>7839</EMPNO>
<ENAME>KING</ENAME>
<JOB>PRESIDENT</JOB>
</ROW>
<ROW>
<DNAME>ACCOUNTING</DNAME>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
</ROW>
<ROW>
<DNAME>ACCOUNTING</DNAME>
<EMPNO>7934</EMPNO>
<ENAME>MILLER</ENAME>
<JOB>CLERK</JOB>
</ROW>
<ROW>
<DNAME>RESEARCH</DNAME>
<EMPNO>7566</EMPNO>
<ENAME>JONES</ENAME>
<JOB>MANAGER</JOB>
</ROW>
But the depts should be considered as seperate groups, to get the correct hierarchy:
<?xml version="1.0" encoding="UTF-8"?>
<ROWSET>
<ROW>
<DEPT>
<DNAME>ACCOUNTING</DNAME>
<EMP><EMPNO>7839</EMPNO><ENAME>KING</ENAME><JOB>PRESIDENT</JOB></EMP>
<EMP><EMPNO>7782</EMPNO><ENAME>CLARK</ENAME><JOB>MANAGER</JOB></EMP>
<EMP><EMPNO>7934</EMPNO><ENAME>MILLER</ENAME><JOB>CLERK</JOB></EMP>
</DEPT>
</ROW>
Someone here who had similar problems ?
Thanks,
Jochen

Hello,
You could just run it through an XSLT after download to fix it up exactlly how you want it.
Or call an On Demand Process that builds out the XML exactly how you want it.
there is an example of me building out xml here and getting it from a link (it's a svg graphic but the concept is exactly the same) http://apex.oracle.com/pls/otn/f?p=11933:90
Carl

Similar Messages

  • When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb.But the output records is originally 4000 records. When copy to new excel it is showing 3.5 mb only. Does anyone knows the answer for this issue?

    When running an xml publisher report the xml output leads to 9 mb and the excel output file leads to 20 mb. The records contained in excel file is 4000 records. When taking the excel records and copy to new excel file the excel file size is 3.5 mb only.Why does the oracle software generates 20mb file?
    Does any one knows the answer please advice?

    Hello,
    This issue is because the Excel output from BI Publisher is MHTML (XML Publisher generates XHTML) not binary .xls.
    MHTML and XHTML are more verbose formats than binary .xls.
    It will be large because the current Excel output is just an HTML and not compressed like PDF. Please use the workaround (save it as .xls file).  This is a known limitation of RTF layout templates.
    BI Publisher Enterprise has a new feature True Excel Templates. The layouts generate binary Excel output.
    Excel Output File Size Generated By BI Publisher is Very Large (Doc ID 760437.1)
    Bogdan

  • Reports with XML output complete in error

    Hi,
    We have migrated Oracle eBiz from HP UX Itanium platform to Linux x86. Since then reports with XML output are completing with following error.
    stat_low = 6
    stat_high = 0
    emsg:was terminated by signal 6
    Enter
    Password:
    *** glibc detected *** ora_rw20_run: free(): invalid next size
    (fast): 0x090ee648 ***
    Please advise solution if anybody knows.
    Regards.

    Pl post EBS version. Does this occur for all concurrent programs ? Or only seeded ones ? Or only custom ones ? Do you utilize the IX library ?
    MOS Doc 1295724.1
    Pl continue the discussion in your duplicate post - Reports with XML output complete with Signal 6 error

  • Oracle Reports with XML output showing data as asterik character

    Hello,
    I'm trying to create an Oracle report with xml output. Here is the issue I'm having some of the columns in my report are of datatype number. When I run the report and generate xml file the values for those columns(datatype number) are showing as (*) character, other columns are showing fine. But when I run the report as text output then data is fine. I don't understand why this is happening.
    The property of column is Column Type - Database Scalar, Datatype - Number , width 0,-127.
    Does the width has to do anything with this?
    I'm using Report Builder 6.0.8.11.3, DB version 10g.
    Can anyone please help me with the issue I'm having.
    Thanks

    If the links in your example report1 and report2
    follow my format stated earlier
    http://machine:port/reports/rwservlet/report=reportnam
    e.rdf&destype=cache& paramform=htmlcss&server=<YourReportSe
    rverName>&userid=scott/tiger@hrdb&desformat=pdf
    This is what I believe
    >
    so http://machine:port/ is the port where
    JBoss is running and
    This should be the port that the report server is listening on
    >
    server=<YourReportServerName> is the name of
    my oracle report server
    so I call the above link in my current application
    and the report would show up
    Yes
    >
    that means (correct me if I am wrong) that my reports
    would have to be deployed in OracleAS
    Yes
    >
    I have to try all this yet as till this point I was
    trying to run Oracle reports deployed in JBoss...
    This may be possible, I am not sure.
    >
    Oracle J2EE Thin Client?
    I am not sure what this is used for in your setup.

  • How can print blank rows for XML output report..

    Hi all,
    I am working in XML output PO fix format report and in that report there is 3 sections. (1) Header section(2)Line section (3) Footer section. My requirement is like this, header and footer section print in all pages and line section break for next page after printing fix 15 lines in a page. And if any page has less then 15 lines then it generate remaining blank row to maintain footer position.
    Please suggest me, how can i generate blank rows and break lines for page if there is more then 15 rows in Line section.
    Thanks in Advance!

    Hi,
    <?for-each:ROW?>
    <?end for-each?><xsl:variable name="cnt" select="count(//row|//ROW)" />
    <?for-each:xdoxslt:foreach_number($_XDOCTX,1,15-count(ROW),1)?> <?end if?>
    this will create 15 lines irrespective of you have that much rows of data in xml or not
    if you want more help , drop me mail @ [email protected]

  • BW report as xml output

    Hello
    I need to make a BW report in xml format.
    When I have a query I only know the options for displaying it as a web template via WebApplicationDesigner or via BEx Analyzer.
    Can anyone help me with the easiest way to get the output in xml format?
    Best regards,
    Tormod

    you need to go for either webservice model
    http://help.sap.com/saphelp_nw04/helpdata/en/d8/3bfc3f8fc2c542e10000000a1550b0/content.htm
    or
    use XMLA
    http://help.sap.com/saphelp_nw04/helpdata/en/9f/9b8f3c855f0454e10000000a11405a/content.htm
    how to doc for XMLA
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/documents/a1-8-4/how%20to%20execute%20an%20xmla%20query%20and%20receive%20the%20xml%20result">How to Execute an XMLA Query and Receive the XML Result</a>
    Regards
    Raja

  • Reports 9i XML output structure

    When you set the output format of a report to XML, what is the structure of the resulting XML file? I saw a partial example in Oracle9iAS Reports Services and XML on page 14-5. However, the comment at the top of the example said that it was generated by Reports 6. Does Reports 9i produce the same XML output as version 6 did?

    Corey,
    Does Reports 9i produce the same XML output as version 6 did? You are right except there has been some bug fixes and few enhamcnements. The structure is same for a specific reports ( specifically the specific datamodel) both in 6i / 9i.
    You can use any free DTD generator to generate DTD / schema for the reports XML output.
    Thanks
    The Oracle Reports team

  • Build Reports from XML output from Reports

    Hi,
    I was just wondering if it is possible to build reports from output in XML format, originally generated by Oracle Reports.
    The XML output produced by Reports is stored in a database for further processing.
    TIA
    Hien

    Hi Hien
    If I have understood this right, you need to create report in XML format from an XML Report Definition File. From the Builder, Generate to File from the File menu and choose XML format for the output.
    Remember that XML output from Reports is Data driven and faithfully reproduces the Data Model. It is NOT layout driven.
    Regards
    Sripathy

  • How do I read a report's XML Output from a procedure?

    I am using E-Business suite 11.5.10.2 and XMLP 5.5. I have a report that will output XML. When this report is run, I can click the 'View Output' button and view the XML. This appears to be a temp file somewhere, because the temp id in the URL changes each time a new report is run. Here's my problem: After running this report, I want to execute a procedure that will loop through the XML output and transform it into HTML. I will then output this HTML to the screen. But I'm not sure how to pass this file as a parameter to my procedure.
    Is there anyway to allow a procedure to consume the XML output?
    The reason I'm trying to do this, is because we need to transform certain reports into Excel format. This is becoming a critical issue. After testing, I found that if I can extract data into an HTML table and display it on the screen, it dumps perfectly into Excel. I tested it using a cursor, but that won't work for production reports. There is a ton of logic built into these Oracle reports, so I need to go the XML route after running the report.
    Looking at previous posts, the current Excel output process seems to be a bit buggy. And, we can not upgrade to Excel 2003 at this time.
    Any ideas would be greatly appreciated!!!
    Thanks.
    Mark K

    Hello Klaus. I appreciate your response. While I'm no expert with XMLP, I have created about 8 production reports using XMLP. I am using XMLP 5.5, and not 5.6.1 I am using Excel 2002 and not Excel 2003. From other posts (shown below), it is my understanding that the Excel output may have bugs unless you're using XMLP 5.6.1 and Excel 2003.
    Please see the following posts for more information:
    Re: EXCEL output not displaying properly
    Excel output in 5.6 version
    Also, when I tried to output to Excel using my desktop version, I received an error message. But, when I switch to PDF format, it opens just fine.
    We are not prepared to upgrade Excel and/or install another patch for XMLP at this time. If I can do what I need to do programmatically, I will have much more leverage when it comes to troubleshooting. On the other hand, when I run into a bug with Oracle software, I usually have to wait for a patch.
    Thanks again.
    Mark K.

  • How to Design Report for Excel output?

    Hello Experts...
    I have both versions Crystal Report XI and Crystal 2013 at this time as we are in the process of Upgrading...
    How to design for excel output with no page size limit.
    I have several fields going across (crossing width of paper size 11X17 landscape) and I do not need this report output to be printed at all only for excel output.
    Appreciate your time!
    Thank you,
    Padma

    Hi Padma,
    You would need to increase the Page Size horizontally. Go to File > Page Setup > Check 'No Printer' > Check 'Dissociate Formatting Page Size and Printer page Size' > Increase the Horizontal value.
    Also see:
    http://scn.sap.com/docs/DOC-6687
    and
    How to WYSIWYG SAP Crystal Reports Export to XLS
    Formatting a Crystal Report for Export to MS Excel
    -Abhilash

  • XSL and FSG report with XML output

    I have 5 FSG Reports combined into one reportset. all these reports output type as XML. Once the reportset is submitted and all the FSG reports are completed , i want to call a XSL program which will combine all the 5 FSG XML outputs. Please advice me how to use the xsl program to combine all the FSG XML Outputs.

    Phew thats gonna be some XSL bearing in mind how complex the FSG XML is. How much data are we talking about here ? There might be a simpler solution as long as there is not a huge amount of data.
    REgards, Tim

  • Adding Comment for XML output

    How to add comment in xml output.
    I have to replace the default comment in the xml output.
    If i use SRW.ADD_DEFINITION, Its not working.
    Can any on guide me through this to achieve it.

    i have written the following code in after parameter form. In the data model i am selecting empno and empname. Now i have to generate an xml which has the comment "Internal purpose only". I have to dynamically change the tag names also. But this code throws an error
    REP-0069:Internal error
    REP-57054: In-Process job terminated:Terminated with error
    REP-866648059:Error in the xml report definition at line 3 in
    Invalid element 'source' in content of 'section',expected elements '[tabular,groupAbove,groupLeftinsideAbove....]
    -------------------------------------------------------code----------------------------
    SRW.ADD_DEFINITION('<report name="Employee"
    author="Generated" DTDVersion="9.0.2.0.0"> <!-- Internal purpose only-->');
    SRW.ADD_DEFINITION('<layout>');
    SRW.ADD_DEFINITION('<section name="main">');
    SRW.ADD_DEFINITION('<source="empno">');
    SRW.ADD_DEFINITION('<source="empname" >');
    SRW.ADD_DEFINITION('</section>');
    SRW.ADD_DEFINITION('</layout>');
    SRW.ADD_DEFINITION('</report>');
    SRW.APPLY_DEFINITION;

  • Unable to use the Copy function while submitting the program for XML output

    Hi
    when i submit the concurrent program with XML output type, getting the output..
    when i submit he concurrent program using the copy button not able to get the output,
    my observation
    while submitting the program the xml template is not called....
    Diagnostics--> view xml -- able to view the ouput.
    do let me know if any of the steps is missing while registration in the xml responsibility..
    this is only with the custom conc program.. the standard program is working fine...
    do help me out..
    Regards
    Yram

    It's really a little difficult to answer your question without a bit more information. What version of JDeveloper are you using? What's your technology stack?
    If this is JDeveloper 11+g+, with the Fusion technology stack, you can use a technique like the one described here:
    http://groundside.com/blog/GrantRonald.php?title=jdeveloper_11_business_services_cascadin&more=1&c=1&tb=1&pb=1
    If it's JDeveloper 10.1.3, with the default Web technology stack, look here:
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#62
    If, as it looks like, this is really a question about generic JSPs (no JSF), you might actually have a bit more success on a generic JSP forum--using scriptlets hasn't really been best practices within JDev since...well, since JSTL became available, really. That was a number of years ago.
    Like I said, there's really no direct way to use Javascript output in a scriptlet--unless you mean something like storing Javascript output in a hidden field, and using the value in a scriptlet on the next request. But by the time Javascript runs, any scriptlet from the current request will already have executed.

  • Logging: GUI for XML output? (Like Chainsaw for Log4j)?

    There is a nice GUI tool to view XML formatted output from Log4J log files. Is there some similar tool for Java logging XML formatted output?

    Hi,
    <?for-each:ROW?>
    <?end for-each?><xsl:variable name="cnt" select="count(//row|//ROW)" />
    <?for-each:xdoxslt:foreach_number($_XDOCTX,1,15-count(ROW),1)?> <?end if?>
    this will create 15 lines irrespective of you have that much rows of data in xml or not
    if you want more help , drop me mail @ [email protected]

  • Functions needed in Data Template for XML output

    Hi ,
    Are there any oracle functions like abs() available
    in data_template to be used as follows
    group name="listItem" source="Q2">
    <element name="amount" value="abs(amount)"/>
    <element name="serialNumber" value="TXN_SERIAL_NO"/>
    I want the absolute value of the amount .
    OR
    Can I HIDE the xml Element like
    <element name="amount" value="amount"/> (i want to hide this tag in output?)
    Please do not suggest to do the same in the SQL query as I am using the SQL query to do something else and resolve another issue.
    rdgs
    xyz

    You can do this abs in Template.
    use xdoxslt:abs or abs from xsl.
    if you want the data in the xml to habe absolute value , then write pl/sql package to this .
    <element name="amount" value="yourpcakage.yourabs(amount)"/>
    or do it in sql query, which you dont want to.

Maybe you are looking for