Monday, 21 January 2019

How to display a Character like "&", "/" between Text in RTF Template

https://xmlpublishertemplate.blogspot.com/2019/01/how-to-display-character-like-between.html

You can write like below for PDF Output

select   distinct   substr( ' & '||trx_type.name,2)  TRX_TYPE_NAME
from 
ar_customers cust
 ,Ra_Cust_Trx_Line_Gl_Dist_All trx_gl,
 gl_code_combinations gcc,
ra_customer_trx_all trx_all,
       ra_cust_trx_types_all trx_type,  -- ,   -- 25 JUL 2011
   gl_code_combinations gcc2   
where
trx_all.org_id between nvl(:FR_ORG_ID,:P_ORG_ID) and nvl(:TO_ORG_ID,:P_ORG_ID)
and  trx_all.org_id  =  :P_ORG_ID
and trx_all.trx_date between  UPPER(nvl(:frdate,'01-JUL-94')) and  UPPER(nvl(:todate,Sysdate))
and gcc.CODE_COMBINATION_ID=trx_gl.CODE_COMBINATION_ID
and trx_gl.CUSTOMER_TRX_ID=trx_all.CUSTOMER_TRX_ID
and cust.CUSTOMER_ID=trx_all.BILL_TO_CUSTOMER_ID
and gcc.SEGMENT2 = nvl(:location,gcc.SEGMENT2)
and cust.CUSTOMER_name like nvl(:cust_name,cust.CUSTOMER_name)
and trx_type.name LIKE  NVL(:inv_Type,'%')
and  trx_all.cust_trx_type_id = trx_type.cust_trx_type_id
and  trunc(trx_gl.GL_DATE) <=  nvl(:p_term_due_date_to,trx_all.term_due_date)
and  trx_type.GL_ID_REC = gcc2.CODE_COMBINATION_ID
and  gcc2.SEGMENT4 = :ACCOUNT_GRP;


In RTF Template add in Text form Field Options

<?substring(TRX_TYPE_NAME,4)?> 


The Result will be like

ELT & TIU & LKK


How to Display and Hide Text in RTF Template on Conditional Formatting

https://xmlpublishertemplate.blogspot.com/2019/01/how-to-display-and-hide-text-in-rtf.html


How to Display and Hide Text in RTF Template on Conditional Formatting

<?if:PAYMENT_CURRENCY_CODE!='PKR'?>

Please ask your Treasury to negotiate Rates before crediting the funds to our Account

<?end if?>


https://drive.google.com/open?id=15ADsxYWSkuDXTBgXZoZJPokgUgNnYRvk

How to Remove a field Space in RTF Template if the field is null

https://xmlpublishertemplate.blogspot.com/2019/01/how-to-remove-field-space-in-rtf.html


How to Remove a field Space in RTF Template if the field is null


<?for-each:G_BUSINESS_GROUP_ID?>

<?BANK_NAME?>

<?if:ADDRESS_LINE1!=''?> <?ADDRESS_LINE1?> <?end if?>

<?if:ADDRESS_LINE2!=''?> <?ADDRESS_LINE2?> <?end if?>

<?if:ADDRESS_LINE3!=''?> <?ADDRESS_LINE3?> <?end if?>

<?if:ADDRESS_LINE4!=''?> <?ADDRESS_LINE4?> <?end if?>

<?if:CITY!=''?> <?CITY?> <?end if?>

<?end for-each?>


How to Remove a field Space with Heading in RTF Template if the field is null

<?if:REF2!=''?> Reference: <?REF2?> <?end if?>

<?if:ATTENTION!=''?> Attention: <?ATTENTION?> <?end if?>


How to Display and Hide Text in RTF Template on Conditional Formatting

<?if:PAYMENT_CURRENCY_CODE!='PKR'?>

Please ask your Treasury to negotiate Rates before crediting the funds to our Account

<?end if?>


https://drive.google.com/open?id=15ADsxYWSkuDXTBgXZoZJPokgUgNnYRvk

Wednesday, 2 January 2019

How to capture Images and Logos in Excel Report Output from Oracle XML RTF Template - Oracle EBS R12

https://xmlpublishertemplate.blogspot.com/2019/01/how-to-capture-images-and-logos-in.html

How to capture Images and Logos in Excel Report Output from Oracle XML RTF Template - Oracle EBS R12


Oracle don't support image embedding for Excel output.
Please use external image reference method instead of image embedding for Excel output.
Oracle can display the logo in Excel from an RTF template by following these steps.

Copy the Picture/Image in RTF Template
Oracle Supports gif, png and jpg Formats. Please don't use JPEG Format

After Copy paste the image in RTF Template. Click the image and navigate to Picture Tools > Format > Alt Text

Copy paste the Below url as it is:
url:{'${OA_MEDIA}/IMAGE_FILE.png'}



Copy IMAGE_FILE file to $OA_MEDIA directory.

Test Report

For Office 2007, please have a look at Note:1286323.1 - How To Format the Image URL in a BI Publisher RTF Template Using MS Word 2007?
it seems that the syntax changed in Office 2007
from
    url:{'$[OA_MEDIA]/image.jpg'}
to
     url:{'${OA_MEDIA}/image.jpg'}

-->>  {} instead of []

In the above URL "IMAGE_FILE" is the File name which you will place it in the $OA_MEDIA directory with the same name. Anyhow, you can change the name as you like. But, keep the names same which you have in Alt Text box and the file you have copied in $OA_MEDIA directory.

http://oracleapps88.blogspot.com/2016/03/how-to-insert-images-and-logo-in-xml.html


Tuesday, 1 January 2019

How to Color a field in XML RTF Template with Condition - Oracle EBS R12

https://xmlpublishertemplate.blogspot.com/2019/01/how-to-color-field-in-xml-rtf-template.html

How to Color a field in XML RTF Template with Condition - Oracle EBS R12

Please make three Text form field Options


<?if:USER_DESC!=''?>
<xsl:attribute      xdofo:ctx="block" name="background-color">yellow    </xsl:attribute>

<?PER_AR?>  --FIELD NAME


<?end if?>


Different Colors in one Field or Cell (Please make three Text form field Options)

<?if:USER_DESC=''?> <xsl:attribute      xdofo:ctx="block" name="background-color">white    </xsl:attribute> <?end if?>

<?if:USER_DESC!=''?> <xsl:attribute      xdofo:ctx="block" name="background-color">yellow    </xsl:attribute> <?end if?>

<?PER_AR?>  --FIELD NAME

How to Hide first Character in XML RTF Template - EBS Oracle R12

https://xmlpublishertemplate.blogspot.com/2019/01/if-you-just-want-to-eliminate-first.html

If you just want to eliminate the first character of the string you can use this workaround. 

<?substring(STRING_TO_BE_TRIMMED,2)?>