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>
</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…:)
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
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.
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
Hi Deepesh,
I have sent an extract of F986169 to your email id..kindly check..you dont need F986168 to be loaded..
Regards,
Sonal
You can set up OSA interface:
1.go P986168
2. Add or modify the Output Stream Access Interface Definition
3. Add
4. Fill info like this:
ExecutionPoint OSALibraryName OSAFunctionName
StartDocument XMLPOSA XMLP_StartDoc
TextOut XMLPOSA XMLP_AddObject
Finakize Document XMLPOSA XMLP_EndDoc
The last items default
I will also appreciate the tables thanks!
Hi Leo,
Deepesh will share with you the fle..
Regards,
Sonal.
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 đ
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
Sonal,
Very good explanation on how to write code in rtf template and preview the data in pdf with XML as source.
I am new to BI Publsiher creating rtf templates using xml source generated from JDE report(from P95620).Create few reports where the XML data is simple.
Right now I am working on one invoice report which has to be published from BI. The issue in the xml source is data is being overflown in other tags. for example.
I created version for BIP exclusively and executed the report for a selected business unit and three address numbers.In the xml source it is showing 5 tags for address numbers.
There is level break on address number in the JDE report. The same report when I execute from standard version is displaying correctly with 3 pages(each page for a address number).
Is there any work around to display only 3 pages with required information.
Let me know in case If I have to send the XML source
Thanks,
Vijay
Hi guys
In Demo it is not possible to “submit” the Report Defintion since there is no server setup. You can run the RD but it will automatically pick your Word or PDF template. However, I have tested it in a full install and it works really well. The final submit of the Report Defintions is done in P95620.
It is possible to permanently associate a RD with a version i.e. have a Default Report Defintion. In Batch Version Design go to Revise Version and select Report Definition from the Form exit. In the next screen supply the Report Definition you have set up. Next time you submit this version it will automatically run the RD instead. Remember, this only works in a fully implemented system
cheers
Leo
Correction on my previous submission -2nd sentence: It will NOT automatically pick up the template in DEMO
Leo
Hi
Thanks Deepesh, Sonal and Leo for the good work…
Deepesh…Could you please share the extract of F986169…
Thanks,
Sandeep
Can someone please, Kindly specifically identify which to download from the above link??
Thanks A lot for this ……..
đ
Hi Deepesh and Sonal,
Can you please explain how to handle Hide Object (used in UBE not to print on certain conditions) in RTF template?
Thanks in advance,
Damu
I am new to BI publisher and i am trying to create a pick slip template. I have a questions.
1. I have manually created a table and added the field values to the template. I am trying to print 4 items on the list and i am getting 5 lines on the template. First 3 lines refer to the item number and then i am seeing a blank line and then the 4th line on the item number is appearing on the BI template list.
2. What is the difference between manually building a table vs using a table designer from the word template.
Hi
Please check out size of your report columns you are displaying on RTF.
Also can you send us the RTF template and XML for reference.
Regards
Jitender
Jitender,
Thank you for your response. Can you please provide me you id or site where i can post my rft.
Thanks