<?if:OU_REGION2='SP'?> SE REGIÃO FOR SP VAI MOSTRAR ESSE TEXTO, CAMPOS, ETC <?end if?>
<?if: ITEM_ANTIGO != ''?> SE TEM ITEM ANTIGO ISSO VAI APARECER <?end if?>
After several attempts, this is the way it was more efficient:
<?choose:?>
<?when:PROMISED_DATE!=''?> AQUI VAI TEXTO E CAMPOS <?end when?>
<?otherwise:?> SE O PROMISED_DATE FOR NULO, VAI VAI MOSTRAR ISSO <?end otherwise?>
<?end choose?>
<?xdoxslt:ifelse(substring(ITEM,1,4)='JOAO', 'JOAO DA SILVA', 'não é o joao')?>
<?if:CF_LPN_FLAG='Y'?>
<?split-by-page-break: ?>
<?end if?>
or
<?for-each:DEPT?>
...
...
...
<?split-by-page-break:?>
<?end for-each?>
Convert Data DD-Mon-YYYY to DD / mm / yyyy \r\n
cases that can not change the query (mainly in core reports, where the date definition is not an xml, but some routine in java. Then it is possible to format the date using decode (this case does not matter if it is English or portuguese) [
TAG To boot Header and Footer Complex \r\n
The standard Header problem of RTF / Word is that they do not accept use "Fields". In summary, the code occupies a lot of physical space. Dai can happen that the header stays half of the page! (and this size is fixed ). To solve the problem, the standard Word Header is not used. We put the header on the page itself and informs Bi Publisher where the header is, the body and footer for these special tags:
SEU_CABEÇALHO COMPLEXO AQUI
SEU_CABEÇALHO COMPLEXO AQUI
<?start:body?>
CORPO DO RELATÓRIO
CORPO DO RELATÓRIO
<?end body?>
FOOTER DO RELATORIO
<?body-start?>
<?body-end?>
1. Initialize the variable "var" outside the repetition group:
<?xdoxslt:set_variable($_XDOCTX,’var’,0)?>
<?xdoxslt:set_variable($_XDOCTX,’var’,xdoxslt:get_variable($_XDOCTX,’var’)+ translate(translate(LINE_AMOUNT,'.',''),',','.'))?>
<? format-number: xdoxslt:get_variable($_XDOCTX,’var’); '999G999G999D99' ?>
Repeat group with sorting in 2 fields \r\n
<?for-each:LINE_LOCATIONS_ROW?>
<?sort:../../LINE_NUM;'ascending';data-type='number'?>
<?sort:PROMISED_DATE;'ascending';data-type='text'?>
This example is creating a loop in line_locations_row and forcing ordering by Line_NUM in 2 previous levels and also in Promised_Date.
Export XML Publisher via FndLoad [/ Size]
Example:
FNDLOAD apps/senha 0 Y DOWNLOAD $XDO_TOP/patch/115/import/xdotmpl.lct ~/thomas/seu_arq.ldt XDO_DS_DEFINITIONS APPLICATION_SHORT_NAME=XG DATA_SOURCE_CODE=XG_XML_AP_001
FNDLOAD user/pword@mydb 0 Y DOWNLOAD
$XDO_TOP/patch/115/import/xdotmpl.lct XMLPData.ldt XDO_DS_DEFINITIONS
APPLICATION_SHORT_NAME=AR DATA_SOURCE_CODE=ARXCOBLX
TMPL_APP_SHORT_NAME=AR
TEMPLATE_CODE=ARLETTER1
It is possible to make the report come out each line with a color, example: white, gray, white, gray, etc.
<?choose:?>
<?when:position() mod 2=0?>
<?attribute@incontext:background-color;'Yellow'?>
<?end when?>
<?otherwise:?>
<?attribute@incontext:background-color;'Red'?>
<?end otherwise?>
<?end choose?>
Keep zeros on the left When the output is Excel
Excel is so smart that when he sees an 00001, he places 1. The Problem is that sometimes we want the zeros in front. To do this, just use the code below: (and replace item_number by your field with zeros)
<fo:bidi-override direction="ltr" unicode-bidi="bidi-override">
<?ITEM_NUMBER?>
</fo:bidi-override>
="<seu_campo_aqui>"
Format Values ??- Money [/ Size]
This command formats the output of cash, according to the currency. [[19]
<?format-currency:CAMPO_VALOR;CAMPO_CURRENCY_CODE;'false'?>
Sometimes XML Publisher only gives a message:
Post-Processing of Request 39113073 Failed at 14-Mar- 2014 19:19:13 With the error message:
One or more Post-Processing Actions Failed. Consult The OPP Service Log for Details.
In these cases, we run the following Query to find the file containing more details:
SELECT fcpp.concurrent_request_id req_id, fcp.node_name, fcp.logfile_name
FROM fnd_conc_pp_actions fcpp, fnd_concurrent_processes fcp
WHERE fcpp.processor_id = fcp.concurrent_process_id
AND fcpp.action_type = 6
AND fcpp.concurrent_request_id = 39113073 -- this is the request id