«

»

May 28 2010

Creating RTF Templates (OBIP)

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Hey Obipper’s!

Feels like allz well 🙂

Stepping the accelerator…I mean Lets get started..

  • Install the Template Builder. You can download the template builder from here.

http://www.oracle.com/technology/software/products/publishing/index.html

  • You will be able to see the extra icons on your MS Word as :

  • Let us consider an example to start with by designing the report in JDE.

They say try and make your Life Simpler :). So just considering two fields from the Business View (V0411G) i.e. Address Number (AN8) and Amount Gross (AG).


After designing the report start following the below steps :

Step 1: Generate the respective XML file of your report by using the option “OSA Interface Name” as displayed while executing your report.

Select “XMLPOSA” on the torch available for OSA Interface Name

Step 2: Load the XML File using the Data Menu of Template Builder.

Step 3: Save the template as your report name .rtf (for e.g. R5804112.rtf).

Step 4: Place the Fields that you want to display on your report by making use of Menu InsertàField of Template Builder placed after Data.


Click on Insert


Step 5: Preview PDF

Voila!

For sure you must have noticed something, only the first record gets printed a’nt it. Let’s Tickle our brain cells a bit and think the processing of our Do section in JDE. Each record from a Business View needs to be processed. Read your XML Code generated once. For me it is

===================================================

<A_P_Detail_Reports_S1> {This is the Business View Name used in the report}
<AddressNumber_ID4>903066</AddressNumber_ID4>
<AmountGross_ID6>0.00</AmountGross_ID6>
</A_P_Detail_Reports_S1>
- <A_P_Detail_Reports_S1>
<AddressNumber_ID4>903066</AddressNumber_ID4>
<AmountGross_ID6>42800.00</AmountGross_ID6>
</A_P_Detail_Reports_S1>
- <A_P_Detail_Reports_S1>
<AddressNumber_ID4>903066</AddressNumber_ID4>
<AmountGross_ID6>-1080.00</AmountGross_ID6>
</A_P_Detail_Reports_S1>

===================================================

I have received three lines of Data Present in Business View (V0411G-A/P Detail Reports) based on some Data Selection. I have to print this data on our .rtf template.

Here comes one of the Key Player of programming language which we all know as “For Loop”. It is called Repeating element in BI.

Syntax for XML For Loop is:

Insert the following tag before the first element:

<?for-each:XML group element tag name?>

Insert the following tag after the final element:

<?end for-each?>

{For Each record of business view}


For our example it would be:

====================================

<?for-each: A_P_Detail_Reports_S1?>

AddressNumber_ID8         AmountGross_ID12

<?end for-each?>

====================================

After adding this Syntax to your template all records present in the Business View will get displayed on the PDF. Carrying the Journey forward, Lets enhance the report by Grouping it on Address Number. Add a Level Break Header and Footer to your report.


Step 6: Generate the XML file again as you have added the Level Break Header and Footer. Read the XML File generated:

=========================================================

<A_P_Detail_Reports_S1> {Open the recordset to read from the Business View}

<On_Address_Number_S5> {Call for first Group Header}

<AddressNumber_ID2>100853</AddressNumber_ID2> {Data loaded for 1st LBH}

<A_P_Detail_Reports_S1>       {Read first Value grouped from BSVW for 1st LBH}
<AddressNumber_ID8>100853</AddressNumber_ID8>
<AmountGross_ID12>529.96</AmountGross_ID12>
</A_P_Detail_Reports_S1>

<A_P_Detail_Reports_S1> {Read second Value grouped from BSVW for 1st LBH}
<AddressNumber_ID8>100853</AddressNumber_ID8>
<AmountGross_ID12>4345.60</AmountGross_ID12>
</A_P_Detail_Reports_S1>

</ On_Address_Number_S5> {Call to close for first Group Header}

<On_Address_Number_S5> {Call for Second Group Header}
<AddressNumber_ID2>903066</AddressNumber_ID2> {Data loaded for 2nd LBH}
<A_P_Detail_Reports_S1> {Read first Value grouped from BSVW for 2nd LBH}
<AddressNumber_ID8>903066</AddressNumber_ID8>
<AmountGross_ID12 />
</A_P_Detail_Reports_S1>

<A_P_Detail_Reports_S1>{Read second Value grouped from BSVW for 2nd LBH}
<AddressNumber_ID8>903066</AddressNumber_ID8>
<AmountGross_ID12>42800.00</AmountGross_ID12>
</A_P_Detail_Reports_S1>

<A_P_Detail_Reports_S1> {Read third Value grouped from BSVW for 2nd LBH}
<AddressNumber_ID8>903066</AddressNumber_ID8>
<AmountGross_ID12>-1080.00</AmountGross_ID12>
</A_P_Detail_Reports_S1>

</On_Address_Number_S5> {Call to close for Second Group Header}

</A_P_Detail_Reports_S1> {Close the recordset of Business View}

===================================================

For sure you would think of writing a piece code like this, If not then you drive on the right Highway 🙂

======================================================

<?for-each: A_P_Detail_Reports_S1?>

<?for-each: On_Address_Number_S5?>

AddressNumber_ID8         AmountGross_ID12

<?end for-each?>

<?end for-each?>

=================================================

Well have a look at your XML Code generated, it says:

=====================================================

<On_Address_Number_S5> {Call for first Group Header}

<AddressNumber_ID2>100853</AddressNumber_ID2>{Data loaded for 1st LBH}

< A_P_Detail_Reports_S1 >       {Read first Value grouped from BSVW for 1st LBH}

<AddressNumber_ID8>100853</AddressNumber_ID8>

<AmountGross_ID12>529.96</AmountGross_ID12>

</ A_P_Detail_Reports_S1 >

< A_P_Detail_Reports_S1 > {Read second Value grouped from BSVW for 1st LBH}

<AddressNumber_ID8>100853</AddressNumber_ID8>

<AmountGross_ID12>4345.60</AmountGross_ID12>

</ A_P_Detail_Reports_S1 >

</On_Address_Number_S5> {Call to close for first Group Header}

=================================================

Within Group the recordset is enclosed in Business View, So the code would be:

==========================================

<?for-each: A_P_Detail_Reports_S1?>

<?for-each: On_Address_Number_S5?>

<?for-each: A_P_Detail_Reports_S1?>

AddressNumber_ID8         AmountGross_ID12

<?end for-each?>

<?end for-each?>

==============================================

Let’s add Total to the Level Break Footer now:

Let’s print Total on our .rtf by including the field. Generate the XML File once again be. You can now see that the Total for each Group is enclosed within the new Tag generated marked in Green.

============================================

<On_Address_Number_S5> {Call for the Level Break Header}

<AddressNumber_ID2>100853</AddressNumber_ID2>

<On_Address_Number_S6 {Call for the Level Break Footer}>

<A_P_Detail_Reports_S1>

<AddressNumber_ID8>100853</AddressNumber_ID8>

<AmountGross_ID12>529.96</AmountGross_ID12>

</A_P_Detail_Reports_S1>

<A_P_Detail_Reports_S1>

<AddressNumber_ID8>100853</AddressNumber_ID8>

<AmountGross_ID12>4345.60</AmountGross_ID12>

</A_P_Detail_Reports_S1>

<AmountGross_ID1>4875.56</AmountGross_ID1>

</On_Address_Number_S6{Closing Level Break Footer}>

</On_Address_Number_S5> {Closing Level Break Header}

====================================================

In .rtf you would need to write the code as:

Note: Always check the section name if you do a Copy/Paste for the For Loop, remember to change it to respective section.

In most of the requirements handed over to you shall require a format which would be in the form of Tables embedded into it along with Company Icon getting printed.

You can create a Table and include the above Code respectively as:

You can create similar formats as per your requirements.

will be continued…:)

Published under the license.

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
(Visited 408 times, 3 visits today)

About the author

Sonal Teke

Sonal Teke is a Senior Oracle BI Consulatant, a provider of value-added technical services to EnterpriseOne customers. She has over 5 years of experience in areas that include JD Edwards EnterpriseOne Technical, Oracle BI tools, Service Oriented Architecture (SOA), and training. Sonal is a certified EnterpriseOne Technology Consultant.

10 comments

Skip to comment form

  1. Leo Luyendijk

    Thanks for the article – can this work on standalone? I see the P986168 is emtpy (Output Access Stream) – do you perhaps have furhter information? thanks Leo – I am on Tools 8.97

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. Sonal

      Hi Leo,

      Thanks for appreciating the article. Yes this can work on standalone.
      If P986168 is empty you can export the OSA definition from other system and then import it.

      Sonal.

      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  2. Deepesh Divakaran

    Sonal,

    Can you send me the records in the tables – F986168 & F986169. I’m using E9 DEMO too, and can’t setup OSA Interface through the application – P986168.

    Regards
    Deepesh

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. Sonal

      Hi Deepesh,

      I have sent an extract of F986169 to your email id..kindly check..you dont need F986168 to be loaded..

      Regards,
      Sonal

      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  3. Leo Luyendijk

    I will also appreciate the tables thanks!

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. Sonal

      Hi Leo,

      Deepesh will share with you the fle..

      Regards,
      Sonal.

      VA:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  4. eja

    i would like to know, how can i display the output horizontally instead of vertically. The output will be displayed based on line items below :

    Parent item
    –>child line item 1
    –>child line item 2
    –>child line item 3

    So in the rtf/report it will display such as –Code :child line item 1
    child line item 2
    child line item 3
    But i need to do in this format –Code :child line item 1,child line item 2,child line item 3

    Please advice and email me..Thank you 😉

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  5. Leo Luyendijk

    Sonal and Deepesh

    I did get this to workon E8.12 Standalone.

    An alternate to using XMPLOSA during the OSA override at runtime, one can define a Report Definition and permanently link your BI Publshiher version to the template – to use this route the following steps need to be done.
    1. Create a blank template in Word/Excel/Adobe
    2. Add a new object to the E1 BI Object Repository (P95600)
    3. Create an E1 Publisher report definition
    4. Submit the report – this generates PDF and/or XML output
    5. In Word/Excel/Adobe download the XML file and design template
    6. Update report layout with Data fields from XML output
    7. Upload completed template
    8. Submit report
    9. View output

    What I am not sure about is – do you need the BI Server for this to work on the enterprise server or is it all inclusive in Tools 8.96.8.97?

    Cheers

    Leo

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
    1. Deepesh M Divakaran

      Hi Leo,
      Let me ask a real dumb question, How do you submit the Report definition?

      VN:F [1.9.22_1171]
      Rating: 0 (from 0 votes)
  6. sonal

    Hi Leo,

    Its inclusive of tool release.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply