• Welcome to the upgraded JDELIST forum and thank you for your patience.
    Please restrict discussions and issues regarding the new forum software to the Off Topic forum. We will be monitoring that forum for issues.
    If you have trouble logging in, please reset your password using the forgotten password form: https://www.jdelist.com/community/index.php?lost-password/
    If you are unable to successfully reset your password, please contact us: Click here!
    We hope that you enjoy the upgraded forum.
  • Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

Embedded BI Publisher for JDE and dynamic page re-sizing (XSL-FO Stylesheet)

Hi,

We have a requirement from a customer to have a RTF Template for invoices to dynamically change the page size, based on the company location where it is processing. In other words, for the US location, invoices need to print with a page size="letter", whereas all other locations the invoices need to print as page size="A4" with the same template.

I reviewed this requirement and have been utilizing the approach by modifying the XSL-FO stylesheet (which is exported from the Invoice RTF Template).

This approach worked when testing on a local machine. Based on customer location, a local test allowed the invoice to print "A4" or "letter" dynamically (which I tested this using the "Template Viewer" tool on a local standalone windows machine).

However, when trying to install this onto a JDE server, by setting up a XMLP repository object (XSL object type - P95600), I found that this does not work. I also found, that the report definition (P95620) containing the XSL XMLP Repository object, does not allow PDF output (greyed out under output options).

With BI Publisher Enterprise Standalone, the XSL-FO stylesheet can be configured to output either as PDF or XML.

It seems that this does not work with BI Publisher Embedded with JDE and is not supported.

Can anyone provide suggestions (or possible solutions) on how to approach this requirement. The RTF has to dynamically change page size when processing via BIP based on condition (instead of needing to create a new RTF).

Any response will be much appreciated.

JDE Tools Release: (9.2.0.7)
 

jileto

Well Known Member
I know you don't like multiple RTFs... But hear me out...

Have 2 RTFs. Each RTF contains a call to a subtemplate - say procMAIN. 1 RTF is sized for Letter. The other RTF is sized for A4. The subtemplate procMAIN contains all the logic to process the XML.

This is possible because when you call a subtemplate that accepts parameters, you can pass simple values, like text, numbers, dates; or complex values, i.e. entire nodes. Remember, everything in XML is a node.

All the template logic stays in 1 place, the subtemplate. The other 2 are just wrappers that determine the paper size.
 
Hi Jileto,

Thank you very much for this suggestion! :) It is a brilliant idea and makes sense that this approach will work.

Much appreciated
 
Top