Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Bi Publisher - loop over variable NOT over XML tag

Received Response
140
Views
1
Comments

Summary

Bi Publisher - loop over variable NOT over XML tag

Content

Hello folks,

I'm having trouble producing a report using BI Publisher.

Basically I have an XML with these tags:

<course>

     <course_id>1</course_id>

     <start_date>2017-01-17</start_date>

     <end_date>2017-01-19</end_date>

</course>

I would like to generate N rows, where N = end_date - start_date, in order to obtain

2017-01-17

2017-01-18

2017-01-19

NB: I'm using Oracle Taleo to generate report and, since it works with a report creation wizard, I can't manipulate the report query to obtain a XML with a row for each course date beetween start_date to end_date. So I cannot obtain an XML like that:

<course>

     <course_id>1</course_id>

     <course_date>2017-01-17</course_>

</course>

<course>

     <course_id>1</course_id>

     <course_date>2017-01-18</course_>

</course>

<course>

     <course_id>1</course_id>

     <course_date>2017-01-19</course_>

</course>

I found that, using xdoxslt:date_diff function, I can obtain the date difference N, so my idea was to iterate, with a counter variable, from 0 to N.

My problem is that BI Publisher loop operation <?for-each:name?> allows me to iterate only over a XML tags and not over a variable, and I cannot find a BI Publisher operation to do that.

Anyone can help me?

I'm using BI Publisher Desktop 12.2.1.2.0 with Microsoft Word 2013.

Thanks in advance,

Piero

Answers

  • YGUTTIKONDA
    YGUTTIKONDA Rank 6 - Analytics Lead

    I did not quite understand your requirement.. but for "My problem is that BI Publisher loop operation <?for-each:name?> allows me to iterate only over a XML tags and not over a variable"  --> include a null column in your query and make sure in the publisher properties it's set to create tags for null elements (" Include Empty Tags for Null Elements ") .. this can be used as a workaround for whatever your trying to do

    --YG