You are on page 1of 16

XLS Processor Engine for Oracle BI Publisher

How To Tutorials/ Tips & Tric s

Intro!uction
Oracle BI Publisher (formerly XML Publisher) by Oracle Corporation (the part of Oracle EBusiness Suite technolo ical stac!) is a multifunctional report "esi ner# $nfortunately% this pro"uct has ot some functional limitations# &or instance% you cannot "esi n Microsoft E'cel templates an" create reports base" on these templates# Of course% you can "esi n ()& template usin Microsoft *or" an" publish report in Microsoft E'cel base" on this template% but there are some shortcomin s of this metho"+

It,s impossible to use e'istin XLS templates# -ou .L*.-S M$S) "esi n ()& template# -ou can,t import e'istin sprea"sheet from E'cel to *or"# )here is a tabs limitation# It,s impossible to publish report usin Microsoft *or" template on separately tabsheets# ou cannot create a /i"e sprea"sheet by ()& template if the number of columns is more than 01# Publishe" Microsoft E'cel report "iffers from the "esi ne" template (especially for comple' cross table reports)# Output report is publishe" in 2)ML format# Microsoft E'cel opens such files /ith a consi"erable "elay#

.ll of these shortcomin s /ill be consi"ere" in "etail after/ar"s# So /e,3e come to the conclusion+ the re3ie/e" shortcomin s practically "isable the "esi n of comple' E'cel reports by Oracle BI Publisher# 2o/e3er% "esi n of such reports is one of the lar est part of Oracle E-Business Suite report "e3elopers, /or!# So /e,3e ot ne't ob4ecti3es+

5i3e a possibility to "esi n templates usin Microsoft E'cel .n" publish reports base" on these templates usin Microsoft E'cel

Solution path
)he solution path is base on the follo/in bac! roun"+ 6# Microsoft E'cel (3ersion 7889 an" hi her) supports :XML Sprea"sheet; "ata format# )his format is a XML file /hich contains E'cel table structure an" "ata# So this format can be use" both to "esi n an" store templates an" to publish reports# 7# XML Publisher uses XSL-XML templates for publishin reports# )hese templatess can be enerate" manually or by custom soft/are# So /e shoul" carry out se<uence of operations to create a template an" publish a report+ 6# 7# 9# 1# ># 0# @# A# Open Microsoft E'cel XLS file (by E'cel 7889 or hi her)# ."" mar!up to the template layout usin Oracle XML Publisher (eport =esi ner,s 5ui"e# Sa3e the template as :XML Sprea"sheet;# Con3ert the XML template into the XSL-XML template# $ploa" the XSL-XML template into Oracle XML Publisher# Set up a ?ie/er Options for Oracle e-Business Suite# Launch report eneratin an" publishin process# ?ie/ the output report 3ia Microsoft E'cel#

Let,s e'amine each operation in "etail belo/#

How to a!! "ar up to the te"plate using #icrosoft E$cel


*e use for template "esi n Microsoft E'cel 7889 or hi her /ithin the frame/or! of our solution# Loa" the e'istin multisheet template into Microsoft E'cel an" a"" mar!up to the template layout to create the mappin bet/een the layout an" the "ata source# Notice: You should follow Oracle XML Publisher Report Designer's Guide[/lin ! "section #$reating an R%& %e'plate()* )hen sa3e the finishe" template as :XML Sprea"sheet;#

How to con%ert X#L te"plate into XSL&X#L te"plate


)ry to use our XLS Processor En ine for OracleB BI Publisher utility to con3ert XML template into XSL-XML template# )rial 3ersion of this utility is "istibute" free of char e but itCs ot the follo/in limitations+

parse of the first tabsheet of template onlyD perio" of 61 "ays for the sole purpose of e3aluatin #

.ctually% you can con3ert the template 3ia sin le clic!# -ou can choose XML Spea"sheet template by clic!in Open .n" Process button# .t runtime the pro ram is lo main pro ram /in"o/)# in errors an" /arnin s of con3ersion process (you can see it on the

.s a result of the con3ersion there,ll be create" XSL-XML template in source "irectory# )he name of XSL-XML template is e<ual to the source file an" the e'tension is :XSL;#

How to uploa! XSL&X#L te"plate to Oracle BI Publisher


-ou shoul" choose template type XSL-XML /hen you uploa" your template by )emplate Mana er

How to set up 'iewer Options for Oracle e&Business Suite


-ou /ill nee" set up ?ie/er Options correctly 3ia System ."ministrator responsibility to 3ie/ publishe" reports properly# Step 6 (Install EF ?ie/er Options) -ou,ll nee" to create a ne/ recor" for &ile &ormat XML (Mime )ype G applicationH3n"#ms-e'cel% =escription G Microsoft E'cel)

Step 7 (Profile -F System) -ou,ll also nee" to set the 3alue :Microsoft E'cel; for the System Profile Option :?ie/er+ .pplication for XML; an" set the 3alue :Bro/ser; for the System Profile Option :?ie/er+ )e't;

How to create Placehol!ers


XLS Processor En ine for Oracle BI Publisher con3erts the formattin that you apply in your sprea"sheet processin application to XSL-XML# -ou a"" mar!up to create the mappin bet/een your layout an" the XML file an" to inclu"e features that cannot be represente" "irectly in your format# )he most basic mar!up elements are Placehol"ers% to "efine the XML "ata elementsD an" 5roups% to "efine the repeatin elements# BI Publisher pro3i"es ta s to a"" mar!up to your template# (reating Placehol!ers )he Placehol"er maps the template fiel" to the XML element "ata fiel"# .t runtime the Placehol"er is replace" by the 3alue of the element of the same name in the XML "ata file# XLS Processor En ine for Oracle BI Publisher support only basic metho" to parse Placehol"ers# Enter the Placehol"er synta' in your "ocument /here you /ant the XML "ata 3alue to appear# Enter the elementCs XML ta name usin the synta'+ <?XML_element_tag_name?> )ote* )he placehol"er must match the XML element ta name e'actly# It is case sensiti3e# In the e'ample% the template fiel" I&ull JameI maps to the XML element &$LLKJ.ME# In your "ocument% enter+ <?FULL_NAME?> )he entry in the template is sho/n in the follo/in fi ure ("o/nloa" the e'ample)+

How to !efine +roups


By "efinin a roup% you are notifyin BI Publisher that for each occurrence of an element% you /ant the inclu"e" fiel"s "isplaye"# .t runtime% BI Publisher /ill loop throu h the occurrences of the element an" "isplay the fiel"s each time# )o "esi nate a roup of repeatin fiel"s% insert the roupin ta s aroun" the elements to repeat# Insert the follo/in ta before the first element+ <?for-each:XML_group_element_tag_name?> Insert the follo/in ta after the final element+ <?end for-each?> +rouping scenarios Jote that the roup element must be a parent of the repeatin elements in the XML input file#

If you insert the roupin ta s aroun" te't or formattin elements% the te't an" formattin elements bet/een the roup ta s /ill be repeate"# If you insert the ta s aroun" a table% the table /ill be repeate"# If you insert the ta s aroun" te't in a table cell% the te't in the table cell bet/een the ta s /ill be repeate"# If you insert the ta s aroun" t/o "ifferent table cells% but in the same table ro/% the sin le ro/ /ill be repeate"# If you insert the ta s aroun" t/o "ifferent table ro/s% the ro/s bet/een the ta s /ill be repeate" (this "oes not inclu"e the ro/ that contains the Ien" roupI ta )#

,efining +roups XLS Processor En ine for Oracle BI Publisher support only basic metho" to parse 5roups# Enter the ta s in your "ocument to "efine the be innin an" en" of the repeatin element roup# )o create the I-ear of birthI roup in the e'ample% insert the ta <?for-each:G_ EA!_"F_#$!%&?> before the I-ear of birthI fiel" that you pre3iously create"# Insert <?end for-each?> in the "ocument after the summary ro/#

)he follo/in fi ure sho/s the IEmployee brea!"o/n by year of birthI /ith the basic 5roupin an" Placehol"er mar!up ("o/nloa" the e'ample)+

How to !efine If state"ents


$se an If statement to "efine a simple con"itionD for e'ample% if a "ata fiel" is a specific 3alue# 6# Insert the follo/in synta' to "esi nate the be innin of the con"itional area+ <?'f:cond't'on?> 7# Insert the follo/in synta' at the en" of the con"itional area+ <?end 'f?> &or e'ample% to set up the IEmployee brea!"o/n by year of birthI to "isplay emloyees only /hen the year of birth is more that 6L@8% insert the synta' <?'f: EA!_"F_#$!%&>()*+?> before the -E.(KO&KBI()2 fiel" on the template# Enter the <?end 'f?> ta after the emloyees table# )his e'ample is "isplaye" in the fi ure belo/ ("o/nloa" the e'ample)# Jote that you canCt insert the synta' in form fiel"s% only "irectly into the template+

If State"ents in Boilerplate Te$t .ssume you /ant to incorporate an If statement into the follo/in free-form te't+ %he program ,a- .not/ -ucce--ful0 -ou only /ant the InotI to "isplay if the 3alue of an XML ta calle" e<uals IJI# )o achie3e this re<uirement% you must use the BI Publisher conte't comman" to place the if statement into the inline se<uence rather than into the bloc! (the "efault placement)#

If you construct the co"e as follo/s+ %he program ,a- <?'f:1U22E1134N4?>not<?end 'f?> -ucce--ful0 )he follo/in un"esirable result /ill occur %he program ,anot -ucce--ful0 because BI Publisher applies the instructions to the bloc! by "efault# )o specify that the if statement shoul" be inserte" into the inline se<uence% enter the follo/in + %he program ,a- <?'f5'nl'ne-:1U22E1134N4?>not<?end 'f?> -ucce--ful0 &or e'ample% to "isplay in cell CJo JumberC messa e /hen the employee number is empty% insert the synta' <?'f5'nl'ne-:EM6L" EE_NUM#E!344?>No Num7er<?end 'f?> before the EMPLO-EEKJ$MBE( fiel" on the template# )his e'ample is "isplaye" in the fi ure belo/ ("o/nloa" the e'ample)+

How to !efine (hoose state"ents


$se the choose% /hen% an" other/ise elements to e'press multiple con"itional tests# If certain con"itions are met in the incomin XML "ata then specific sections of the template /ill be ren"ere"# )his is a 3ery po/erful feature# In re ular XSL pro rammin % if a con"ition is met in the choose comman" then further XSL co"e is e'ecute"# In the template% ho/e3er% you can actually use 3isual /i" ets in the con"itional flo/ (in the follo/in e'ample% a cell bor"ers)# $se the follo/in synta' for these elements+ <?choo-e:?> <?,hen:e8pre--'on?> <?other,'-e?> )his e'ample is "isplaye" in the fi ure belo/ ("o/nloa" the e'ample)# Jote that you canCt insert the synta' in form fiel"s% only "irectly into the template+

(hoose State"ents in Boilerplate Te$t .ssume you /ant to incorporate an Choose statement into the follo/in free-form te't# &or e'ample% to "isplay in cell CJo JumberC messa e /hen the employee number is empty% insert the synta' <?choo-e5'nl'ne-:?> <?,hen5'nl'ne-:EM6L" EE_NUM#E!344?>No Num7er<?end ,hen?> <?other,'-e5'nl'ne-:?><?EM6L" EE_NUM#E!?><?end other,'-e?> <?end choo-e?>

)his e'ample is "isplaye" in the fi ure belo/ ("o/nloa" the e'ample)+

How to use E$ten!e! S-L an! XSL .unctions


BI Publisher has e'ten"e" a set of SML an" XSL functions for use in templates# )he synta' for these e'ten"e" functions is <?8dof8:e8pre--'on?> for e'ten"e" SML functions or <?8do8-lt:e8pre--'on?> for e'ten"e" XSL functions# )ote* $sin XLS Processor En ine for OracleB BI Publisher you (/) mi' '"of' an" '"o'slt statements /ith XSL e'pressions in the same conte't# &or e'ample% assume you ha" t/o elements% &$LLKJ.ME an" EMPLO-EEKJ$MBE(% that you /ante" to concatenate into a 18-character fiel" an" ri ht pa" the fiel" /ith the character I'I# -ou (/) use the follo/in + <?8dof8:rpad.concat.FULL_NAME9EM6L" EE_NUM#E!/9:+9484/?> because concat is an XSL e'pression# .lso% you (/) use the follo/in + <?8dof8:rpad.FULL_NAME;;EM6L" EE_NUM#E!/9:+9484/?> Certainly% you (/) also use the follo/in + <?concat.8dof8:rpad.FULL_NAME9:+9484/98dof8:rpad.EM6L" EE_NUM#E!9 (+94+4//?> )his e'ample is "isplaye" in the fi ure belo/ ("o/nloa" the e'ample)+

How to !efine Sorting


-ou can sort a roup by e'pression of any element /ithin the roup# Insert the follo/in synta' /ithin the roup ta s+ <?-ort:e8pre--'on?> &or e'ample% to sort the Employee brea!"o/n by Employee Jumber (EMPLO-EEKJ$MBE()% enter the follo/in after the <?for-each:G_FULL_NAME?> ta + <?-ort:8dof8:rpad.EM6L" EE_NUM#E!9(+94+4/?> )o sort a roup by multiple fiel"s% 4ust insert the sort synta' after the primary sort fiel"# )o sort by &ull Jame an" then by Employee Jumber% enter the follo/in <?-ort:FULL_NAME?><?-ort:8dof8:rpad.EM6L" EE_NUM#E!9(+94+4/?> )his e'ample is "isplaye" in the fi ure belo/ ("o/nloa" the e'ample)+

You might also like