Posts

Showing posts from 2008

learning xpath.

When to use // and when not to ? //ELEMENT will get you the node-set all the node matching the element ELEMENT, its very cost and heavy on the parser. Better take caution , when you use this in you template. Here are few links, where it might throws some light , what is that http://www.w3.org/TR/xpath http://www.oreilly.com/catalog/xmlnut/chapter/ch09.html http://www.topxml.com/xsl/tutorials/intro/xsl4.asp http://www.w3schools.com/Xpath/xpath_syntax.asp

Default the date parameter

Use the {$SYSDATE()$} in the default value . The BIP should default it to the current sysdate date.

No conditional import - Subtemplate

Image
You cannot do the conditional import of sub-template. Import them and call them conditionally Create a rtf called MAIN.rtf paste the follwoing. <?import:file:///C:/OraFusion/subtemplate1.rtf?> <?import:file:///C:/OraFusion/subtemplate2.rtf?> <?call@inlines:template1?><?with-param:p_template1;string(‘Call template 1 RTF’)?> <?end call?> <?call@inlines:template2?> <?with-param:p_template2;string('call Template 2 RTF')?> <?end call?> <?if:1>0?> <?call@inlines:template1?><?with-param:p_template1;string(‘Yes, 1 is greater than 0’)?> <?end call?> <?end if?> <?if:1>1?> <?call@inlines:template2?> <?with-param:p_template2;string('call Template 2 RTF')?> <?end call?> <?end if?> The above condition fails, so template2 is not called Create a rtf called subtemplate2 paste the following <?template:template2?> <?param:p_template2;string('sub template 2 rtf

Summation.

Image
Put this code in RTF and then load the data , have a look at the output.

Subscript , Superscript in BIP

How do i create a subscript and superscript in BIP ? we got use the fo element, inorder to display the element as sub or super <fo:inline baseline-shift="super" font-size="6px">2</fo:inline> <fo:inline baseline-shift="sub" font-size="6px">2</fo:inline> Just replace the number value 2 with element from XML. either using <?elementname?> or <xsl:value-of select="element_name"/>

Previous , next element ?

How to access the next element in the xml from the current context? Sometimes, we need the previous month node value, to compare with the current month value. Use XSL functions like following-sibling::, preceding-sibling:: <?for-each:/ROOT/ROW>? ================== Current StartDate <?START_DATE>? Current End Date <?END_DATE>? Next Start Date <?following-sibling::ROW/END_DATE>? Previous End Date <?preceding-sibling::ROW[1]/END_DATE>? ================ <?end for-each>? <ROOT> <ROW> <START_DATE>01-01-1980</START_DATE> <END_DATE>01-01-1988</END_DATE> </ROW> <ROW> <START_DATE>01-01-1988</START_DATE> <END_DATE>01-01-1990</END_DATE> </ROW> <ROW> <START_DATE>01-01-2000</START_DATE> <END_DATE>01-01-2005</END_DATE> </ROW> </ROOT> o/p ================== Current StartDate 01-01-1980 Current End Date 01-01-1988 Next Start Date 01-01-1990 Previous

Count element name like ?

<ROWSET> <ROW> <first_name>Y</first_name> <AAA_DIFF_FLG>N</AAA_DIFF_FLG> <BBB_DIFF_FLG>Y</BBB_DIFF_FLG> <CCC_DIFF_FLG>Y</CCC_DIFF_FLG> </ROW> <ROW> <first_name>Y</first_name> <AAA_DIFF_FLG>Y</AAA_DIFF_FLG> <BBB_DIFF_FLG>N</BBB_DIFF_FLG> <CCC_DIFF_FLG>N</CCC_DIFF_FLG> </ROW> </ROWSET> count the element name like 'DIFF_FLG' with the value ='Y'. Ooops, Looks so simple, but was not able to do in 1o mins. was struggling to get this today evening, thought will crack it tomorrow morning. Didn;t get enough peace in mind, when i had my dinner. cracked it in few mins :) when i was having my cup of milk in the night. <?for-each:/ROWSET/ROW?> cccccccc<?count(.//*[(name(.)=’CCC_DIFF_FLG’ or name(.)=’AAA_DIFF_FLG’ or name(.)=’BBB_DIFF_FLG’ ) and .=’Y’])?> TTTTTc<?count(.//*[(substring-after(name(.),’_DIF’)=’F_FLG’ ) and .=’Y’])?> -----

Barcode , MICR font in BIP

It seems there is difficulty in making the barcode or MIRC font to be printed in the Report using BIP from concurrent program for Ebiz. Basic idea is , these are nothing but a specialised font, the system should recognize them and display it.. 1. Font should eb installed in the server 2. mapped in the BIP 3.Used in the Report Template. here are few links which throws lights on how to do it. This pdf should help you http://blogs.oracle.com/xmlpublisher/files/BarcodePrinting.pdf . http://blogs.oracle.com/mte1521/mt-search.cgi?tag=barcodes&blog_id=63 http://blogs.oracle.com/xmlpublisher/2008/09/barcoding_again.html http://blogs.oracle.com/xmlpublisher/2006/06/how_to_install_a_font_using_xm.html http://blogs.oracle.com/xmlpublisher/templates/templates_rtf/barcoding/

Multiple columns

Image
How do you get multiple columns ? Use Position () and Mod function and identify the which columns , the data has to be displayed.

Dynamic Column

Image
Dynamically create the column based on the no of element in the XML. Here is the sample of, how 2 do that. 1. first table contains, DATA as parent node, which contains 6 columns , so in the o/p we get 6 dynamic columns 2. in the second table, the THREECOLUMNDATA node contains, 3 elements, so is the output too   Winrichman.blogspot.com

How to set dynamic color , based on xml element

Image
The requirement is, based on certain conditions, a cell will be shown in a specific color. The color would be based on an XML element. The xml element will have values like '#FF00FF' etc.. How to use this value and format the cell ? <xsl:attribute xdofo:ctx="block"name="color"><xsl:value-of select="COLORELEMENT" /></xsl:attribute> where COLORELEMENT is the xml element. what are the other formatting can be used ?? All XSL formatting can be used like this few samples are <xsl:attribute xdofo:ctx="block" name="background-image">Image.gif </xsl:attribute> <xsl:attribute xdofo:ctx="block" name="background-position-horizontal">center</xsl:attribute> <xsl:attribute xdofo:ctx="block" name="background-position-vertical">bottom</xsl:attribute> <xsl:attribute xdofo:ctx="block" name="number-columns-spanned">2</xsl:attri

How to set dynamic color , based on xml element

Crosstab with multiple repeating columns

Image
How to create a crosstab with two repeating columns.? Here i have taken a multiple column dynamic generation The loop has to be on both of these columns, so that the vlaues are displayed for each date ;)

Repeat Table Header in all pages in BIP

how to repeat the column titles on a table in all pages if the table extends over several pages What you need to is: 1. Select and Highlight the table header row 2. Right click and select table properties 3. On the Row tab properties , specify that the header row should be repeated on every page 4. Save the RTF 5. BIP looks at the properties of the word settings for the table and will repeat the header row on every page the table needs. This works so well in PDF output, but RTF output seeems to have some issue with this header repeat functionality We all can beleive, In future releases this bug won't be there ;)

Slice Label in Pie chart

Image
How to get the percentage, value or text in the pie chart slice label. use the following SliceLabel textType="LD_TEXT_PERCENT" textType takes the following value, (LD_VALUE | LD_PERCENT | LD_TEXT | LD_TEXT_PERCENT) Unfortunaltely, we cannot get he value and percentage both , as its not being supported by Oracle BIBEAN libraries

How can I find the BIP version from output ?

In order to identify the version from the generated PDF output. In the generated PDF output from Publisher and go File->Document Property menu. PDF producer tells the XML Publisher version used to generate the report.

How to get xml file out from Concurrent PGM

People normally remove the attached template and change the output format of Concurrent Pgm back to XML , then run the Pgm and get the XML out. But it is not required. How to get the XML from a BIP based concurrent request/report: a. View->Requests b. Click on Diagnostics button c. View XML If you are interested in the physical file in Server. Actually XML file is stored in UNIX box @ $APPLCSF/$APPLOUT/o{REQUEST_ID}.out What about the output file format naming convention. Naming convention of the output would be as follows and it resides in the following path The output is $APPLCSF/$APPLOUT/{REPORT_NAME}_{REQUEST_ID}_{COUNT}.[PDF|RTF|EXCEL|HTML] Unfortunately, there is no option , right now atleast in BIP CC Pgm integration to customize the output names, reason , to trace back , they need to follow some standard this way. Tables involved in the CC integration & output ==> FND_CONC_REQ_OUTPUTS In future there might something , which facilitate to change this. Suggestion ,how i

Graph Chart DataMarker

Image
How to enable the marker in chart ? Especially like the one below ? Xsl code for the chart has to be edited little bit, to make it visible, of course right now the BIP plugin , doesn't have this option in the front-end. But in future , independent release , this is going to be there , like as it is in other reporting tools ;) like Oracle Reports... Use this seriesitem <SeriesItems lineWidth="100"> </SeriesItems> And use Series id="0" for each series of colors used, and the mention the shape MS_SQUARE | MS_CIRCLE | MS_DIAMOND | MS_PLUS | MS_TRIANGLE_DOWN |MS_TRIANGLE_UP to customize the size of marker <DataMarker markerSize="40"/> </p> I used it as follows <SeriesItems lineWidth="100"> <Series id="0" color="#FF8000" markerShape="MS_DIAMOND" /> <Series id="1" color="#0000C0" markerShape="MS_CIRCLE" /> <Series id="2" color=&quo

Column Spanning

Image
I saw a request , Column span BIP forum on how to column span, though Tim has his own blog post to explain this Tim's Post , Xplanation It seems causing some confusion, on how to do it, Its an attribute to be used in the column we wanted to span, [ xsl:attribute xdofo:ctx="block" name="number-columns-spanned"] 3 [xsl:attribute ]

How to get the logged in user , OBIEE

How to get the user logged in OBIEE. Question from BIP forum Shashi was asking for , how to get the username, so that, he can use them in the LOV query to filter based on user logged in. I guess, there are many ways to acheive it, using the NQ_SESSION, and alos using the $SYSUSER.username variables. But, he just needs the username to be used in the query. Here it is. Select :xdo_user_name from dual, returns the username. Ex: usage Select dept from table where user_name = :xdo_user_name

Display at the last record.

Image
How to display the record at the end of the Each department. Have a look at the xml, and rtf. Here we have for-each-group@section for each division, at the end of each division, we need a sum of fee for each department. only at the end of last division in each department. Using the position and last function, we can identify and display conditionally. Let me know, if any there is a doubt.

Limit rows per page

Image
Solution to have fixed number of rows in each page. This solution is not a perfect solution considering the line size increases due to text in each line. But this solution gives you how to fix no of rows per page. In the forum Heated discussion Users are arguing for having a placeholder in same fixed place on all pages, irrespective of no of lines , increased line size due to word-wrap. Here i am not going to discuss anything related to that. But a simple logic of , how to fix number of rows. Step 1: Loop through the records and display them Step 2: Have a condition for MOD of position(), then insert a page-break on the result of Zero Step 3. Blank row has to be filled, a condition has to be added, to find how many blank rows ROWLIMIT - (count of row mod ROWLIMIT) will gives us the rows to be filled. Step 4: use foreach_number function to simulate the iteration. Refer the images below

Using XSL template , eliminate carriage return.

Image
Actually the real problem was using the sub-template in RTF, as when you create RTF sub-template, the BIP engine converts the RTF to XSL, while doing this it also preserves the formatting of the word features, so this template: command tag, when gets converted, it automatically puts the extra formatting , which makes the text to go to next line Here is the more cleaner method, Create the sub-templates as XSL file rather than in RTF, and import it in the main template Rest the picture is worth much more times than texts :) Here is the output , The first section is , based on RTF sub-templating The last one is by using the XSL file sub-templating.

Sub-template returns carriage

Image
The sub-template returns carriage Forum BIP is the issue today, I was re-creating the issue locally to see, what is the real issue. Was sucessfully able to re-create it, the real issue is template: command, it automatically wraps the entire sub-template with a fo:block orphans="2" widows="2" linefeed-treatment="preserve" Due to that, the call@inlines will also not be helpful to make the text to display in single line, as its in different formatting block I converted rtf to xsl and manually edited few and was able to create the solution as follows Until unless, we say to template command that, dont introduce it as new block we cannot avoid this carriage return I am hoping to find someother solution to this This was the output we were getting , note the MALE and FEMALE string is in new line But the solution on the right is the one we need

Header, footer using <?start:body?> <?end body?>

Image
How to use start:body tag, and To create a header or footer, we can use the MS word's header and footer section. But if you have complex header and footer, as an alternative, you can use start:body and end body tags to make it as body section of report and distinguish the header and footer regions from the body. Those elements occurring before the beginning of the body <?start:body?> area will compose the header. Those elements occurring after the body <?end body?> area will compose the footer. Use the following tags to enclose the body area of your report: ========================= This will become Header < start:body > < end body > This will become footer =========================

Multiple Invoice copy

Image
How to make copies based on the value for each invoice from XML The copies are different for each invoice. make two loop, one for the no of invoice , which controls , number of invoice to printed. Now you need to make , number of copies based on element, for each invoice. so , make a group variable, for outer loop, so that you refer them in the header and footer, so that the context is maintained through out the page. Make a loop now, using foreach_number, based on the copies element. and put your logic or style for the report, inside this inner loop. But what ever you put, you got to prepend as $G1, otherwise inner loop context will be applied and report will be blank , if you ain't.

Multiple Copies in BI Publisher

Image
Multipe copies of PO needed to be printed based on value of an element in XML I can see the requirement clearly, it would have been better , if there is an option , which can be sent to printer saying print this page three times. But from BIP, it just sends a PDF file out to printer or to display as a file. I dont think there is a command to repeat the page three times. But logically we can make a loop , upper limit of number of copies come from XML element, and make the report repeat as many times. Here is a sample of how can we do that. use foreach_number function which works as a loop and returns you the counter, use the limit /ROWSET/COPIES=3 from this xml on left. you can see the for-each@section runs for as many copies, and the report gets printed 3 times.

Obiee , Ebusiness BIP

Was doing some research in what is the differences between OBIEE BIP and EBiz BIP. i copied it from Tim's blog. BIP Enterprise Server (stand-alone) BIP with EBS 1. Data Extraction Connects to any databases that supports the use of JDBC drivers Meant for only Oracle DB ie the db that EBS is using. Can connect to others but requires licensing 2. Various types of Data Sources ? SQL, Data Template, OBIEE, Olap MDX, Discoverer, Web Services, HTTP / RSS feeds, File Oracle Reports or PLSQL base concurrent programs can extract data from DB. Can use BIP Data Templates to extract from other sources e.g. XML file, Excel, etc 3. Scheduling Scheduler available, scheduler can be configured with different types of databases - oracle, db2, sql server, sybase, etc. Scheduling is managed by concurrent manager. Tight integration with CM to generate output based on user driven template and output format selection. 4. Security Multiple security models supported ? BIP security, Olap, EBS security, datab
Encoding in XML file. What is the encoding in the top of the xml file, It says to the xml parser that, the content in the file is should be encoded using this encoding-type. Example, the characters from Finnish, Swedish, Norwegian and others have Non-Ascii. Including these Non-ASCI character in xml file, xml parser will complain, in order to avoid the error message use the encoding attribute in XML element, or just save without specifying anything.

Tea shops in India.

Tea price got increased Recently i got a chance to hear Aaahafm, this was the topic they were discussing. This made me to write. This is the news which is buzzing in chennai. Tea shop owners are the one, who are getting really affected. Its true, To reaally know what is the issue, we just need to, go back a deacade and see the history of how it was , how its now. Tea shop alias tea kadai, used to be the place where people , not only get tea, its a total refreshment stall for all in the morning. Few benches, few newspapers (can be old too), radio with huge volume are the trade-mark of this shop. I personally remember tea shops playing radio in high volumes. Scenes you usually see here are it wont surprise you to see those who scans newspaper in one hand and tea glass in the other hand. Usually dominated by Keralites, even we have some sayings like, even if you go to Moon , you will find a keralite having a tea shop over there. This really shows how dominace they are in this business. Th

Tea shops in India.

Tea price got increased This is the news really going

Bi publisher XSL Xtended -- continues

Image
I am just releasing the samples in installment basis ,.. i guess, someone who needs to have a look, how to use the xsl extended functions in RTF template, this might be handy...

Xslt Functions continued

Image
here are few more function with samples...

XSLT extended functions

Image
We will look at the function which are available to us in BI Publisher. All the function should be begin with xdoxslt:{function_name} To start with , here are few.

தமிழில் கதை

தமிழில் கதை ஒரு தாத்தா நான் . என்னவென்று சொல்வேன் கூகிள் தாத்தாவின் அழகான மொழி பெயர்ப்பு தன்மையை , அற்புதம் ஆனால் உண்மை .

E-Text Template

Image
How to generate E-text from Bi-Publisher ? 1. Generate XML using any method like sql,pl/sql,Datatemplate.... 2. Create a RTF template for the above generated XML 3. Deploy it. Generation of xml can be done using any one of the method, if its from Ebiz , then mostly the payment report would be the one , which requires EFT output. So, probably the concurrent program based on RDF is alreaddy generating the XML we wanted. I am gonna take a sample XML file and create the E-text rtf template for that. The Output of the report would be I would discuss different template format to generate the same EFT report in another post. wait for it :).