Showing posts with label XML Publisher. Show all posts
Showing posts with label XML Publisher. Show all posts

Monday, 20 January 2020

XML Publisher: Preview not working after Java upgrade

This post is just point out a setting which you need to modify in XML Publisher Desktop, if you have done an upgrade on Java in your machine. 


Error: After the Java update, when you try to do a Preview form XML Publisher Desktop, you get the below error message:




Solution: The reason for the error is because you have the old path set in the "Java Home " field in XML Publisher Settings. Update the Java Home in the below path.

Tools --> Options --> Preview (Tab)






Note:- The path is without the bin folder.

In my example, it is 'C:\Program Files (x86)\Java\jre1.8.0_211NOT 'C:\Program Files (x86)\Java\jre1.8.0_211\bin'



Feel free to point out if anything is wrong/missing in this post.

Tuesday, 16 June 2015

BI Publisher: Format Date in XML/BI Publisher

I have seen few questions in OTN on formatting Date in BI Publisher. One of the responses given in one of the thread looks like something which is not available easily(atleast for me) on googling. So I will post the solution here as it might help someone.

Refer : Extended Function Support in RTF Templates

OTN Thread : https://community.oracle.com/message/13125600#13125600

SQL Statement or XSL Expression Usage Description
format_date() <?xdoxslt:format_date(./AnyDate,'yyyy-MM-dd','MM/dd/yyyy', $_XDOLOCALE, $_XDOTIMEZONE)?> Reads date in one format and creates in another format.

First one ('yyyy-MM-dd') is the output format and the second one ('MM/dd/yyyy') is the input format.

Sample XML:
 <INVOICES>  
      <INVOICE_DETAILS>  
           <INVOICE_DATE1>13-Jun-2015</INVOICE_DATE1>  
           <INVOICE_DATE2>13/06/2015</INVOICE_DATE2>  
           <INVOICE_DATE3>06/13/2015</INVOICE_DATE3>  
      </INVOICE_DETAILS>  
      <INVOICE_DETAILS>  
           <INVOICE_DATE1>13-Jan-2015</INVOICE_DATE1>  
           <INVOICE_DATE2>13/01/2015</INVOICE_DATE2>  
           <INVOICE_DATE3>01/13/2015</INVOICE_DATE3>  
      </INVOICE_DETAILS>  
 </INVOICES>  

Sample RTF Code:
 <?xdoxslt:format_date(INVOICE_DATE1,'dd-MMM-yyyy HH:mm:ss','dd-MMM-yyyy',$_XDOLOCALE,$_XDOTIMEZONE)?>  
 <?xdoxslt:format_date(INVOICE_DATE2,'dd-MMM-yyyy HH:mm:ss','dd/MM/yyyy',$_XDOLOCALE,$_XDOTIMEZONE)?>  

 <?xdoxslt:format_date(INVOICE_DATE3,'dd-MMM-yyyy HH:mm:ss','MM/dd/yyyy',$_XDOLOCALE,$_XDOTIMEZONE)?>  

Output:

Few other helpful blogs on this topic:

Feel free to point out if anything is missing/wrong in this blog