Categories
- All Categories
- Oracle Analytics Learning Hub
- 30 Oracle Analytics Sharing Center
- 18 Oracle Analytics Lounge
- 238 Oracle Analytics News
- 45 Oracle Analytics Videos
- 16K Oracle Analytics Forums
- 6.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 88 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
Programming problem on XML publisher...Please help
Summary
Programming problem on XML publisher...Please help
Content
Hi,
I have the following XML data which is generated from Oracle Report Builder on EBS. I loaded it into the self defined XML template which is developed on XML Publisher to generate a PDF output.
Here is the XML data -->
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
<?xml version="1.0" encoding="UTF-8" ?>
- <!--
Generated by Oracle Reports version 10.1.2.3.0
-->
- <XXAR_CUSTOMERAUD_20170329>
- <LIST_G_CUSTOMER>
- <G_CUSTOMER>
<CUSTOMER_NUMBER>customer_number</CUSTOMER_NUMBER>
<PARTY_ID>26696</PARTY_ID>
<PARTY_NAME>Customer A</PARTY_NAME>
+ <LIST_G_PARTY_ID1>
<LIST_G_CUSTOMER_CONTACT_SITE />
<LIST_G_CUSTOMER_BANK_SITE />
<LIST_G_CUSTOMER_INFO_HEAD />
+ <LIST_G_1>
+ <LIST_G_PARTY_ID6>
</G_CUSTOMER>
- <G_CUSTOMER>
<CUSTOMER_NUMBER>customer_number</CUSTOMER_NUMBER>
<PARTY_ID>30606</PARTY_ID>
<PARTY_NAME>Customer B</PARTY_NAME>
<LIST_G_PARTY_ID1 />
+ <LIST_G_CUSTOMER_CONTACT_SITE>
<LIST_G_CUSTOMER_BANK_SITE />
<LIST_G_CUSTOMER_INFO_HEAD />
<LIST_G_1 />
<LIST_G_PARTY_ID6 />
</G_CUSTOMER>
- <G_CUSTOMER>
<CUSTOMER_NUMBER>customer_number</CUSTOMER_NUMBER>
<PARTY_ID>2855876</PARTY_ID>
<PARTY_NAME>Customer C</PARTY_NAME>
<LIST_G_PARTY_ID1 />
<LIST_G_CUSTOMER_CONTACT_SITE />
<LIST_G_CUSTOMER_BANK_SITE />
<LIST_G_CUSTOMER_INFO_HEAD />
<LIST_G_1 />
<LIST_G_PARTY_ID6 />
</G_CUSTOMER>
</LIST_G_CUSTOMER>
<CP_FIRST_PAGE>N</CP_FIRST_PAGE>
<CF_FROM_DATE>01-MAR-2017 00:00:00</CF_FROM_DATE>
<CF_TO_DATE>31-MAR-2017 00:00:00</CF_TO_DATE>
<CF_LOCATION>HONG KONG</CF_LOCATION>
</XXAR_CUSTOMERAUD_20170329>
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
From the XML tree structure above, the output should be loop like this.
Loop level 1 -> G_CUSTOMER (for Customer A)
Loop level 2 -> LIST_G_PARTY_ID_1 (there is data inside this group)
-> LIST_G_CUSTOMER_CONTACT_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_BANK_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_INFO_HEAD (there is NO data inside this group)
-> LIST_G_1 (there is data inside this group)
-> LIST_G_PARTY_ID6 (there is data inside this group)
Loop level 1 -> G_CUSTOMER (for Customer ![]()
Loop level 2 -> LIST_G_PARTY_ID_1 (there is NO data inside this group)
-> LIST_G_CUSTOMER_CONTACT_SITE (there is data inside this group)
-> LIST_G_CUSTOMER_BANK_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_INFO_HEAD (there is NO data inside this group)
-> LIST_G_1 (there is NO data inside this group)
-> LIST_G_PARTY_ID6 (there is NO data inside this group)
Loop level 1 -> G_CUSTOMER (for Customer C)
Loop level 2 -> LIST_G_PARTY_ID_1 (there is NO data inside this group)
-> LIST_G_CUSTOMER_CONTACT_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_BANK_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_INFO_HEAD (there is NO data inside this group)
-> LIST_G_1 (there is NO data inside this group)
-> LIST_G_PARTY_ID6 (there is NO data inside this group)
However, the XML report now is generated like this ->
Loop level 1 -> G_CUSTOMER (for Customer A)
Loop level 2 -> LIST_G_PARTY_ID_1 (there is data inside this group)
-> LIST_G_CUSTOMER_CONTACT_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_BANK_SITE (there is NO data inside this group)
-> LIST_G_CUSTOMER_INFO_HEAD (there is NO data inside this group)
Loop level 1 -> G_CUSTOMER (for Customer ![]()
Loop level 2 -> LIST_G_PARTY_ID_1 (there is NO data inside this group)
-> LIST_G_CUSTOMER_CONTACT_SITE (there is data inside this group)
-> LIST_G_CUSTOMER_BANK_SITE (there is NO data inside this group)
Loop level 1 -> G_CUSTOMER (for Customer C)
-> LIST_G_1 of customer A (there is data inside this group)
-> LIST_G_PARTY_ID6 of customer A (there is data inside this group)
There is wrong looping behavior. The looping group "LIST_G_1 of customer A" should be included in customer A but it is shown after customer C. Can anyone help? Thanks a lot.
In my XML template ->
<?for-each:LIST_G_CUSTOMER?>
<?for-each:G_CUSTOMER?>
<?for-each:LIST_G_PARTY_ID1?>
<?for-each:G_customer_sites?>
<?end for-each?>
<?end for-each?>
<?for-each:LIST_G_CUSTOMER_CONTACT_SITE?>
<?for-each:G_CUSTOMER_CONTACTS?>
<?end for-each?>
<?end for-each?>
<?for-each:LIST_G_CUSTOMER_BANK_SITE?>
<?for-each:G_customer_BANK_ACCOUNTS?>
<?end for-each?>
<?end for-each?>
<?for-each:LIST_G_CUSTOMER_INFO_HEAD?>
<?for-each:G_customer_info_head?>
<?end for-each?>
<?end for-each?>
<?for-each:LIST_G_1?>
<?for-each:G_1?>
<?end for-each?>
<?end for-each?>
<?for-each:LIST_G_PARTY_ID6?>
<?for-each:G_PARTY_ID6?>
<?end for-each?>
<?end for-each?>
<?end for-each?>
<?end for-each?>
Answers
-
Hi,
Could you attach the complete XML rather than pasting it here.
0