Monday Nov 25, 2013

Conditional Borders

How can you conditionally turn cells borders on and off in Publishers RTF/XSLFO templates? With a little digging you'll find what appears to be the appropriate attributes to update in your template. You would logically come up with using the various border styling options:




Buuuut, that doesnt work. Updating them individually does not make a difference to the output. Not sure why and I will ask but for now here's the solution. Use the compound border formatter border-top|bottom|left|right. This takes the form ' border-bottom="0.5pt solid #000000". You set all three options at once rather than individually. In a BIP template you use:

<?attribute@incontext:border-bottom;'3.0pt solid #000000'?>
<?attribute@incontext:border-top;'3.0pt solid #000000'?>
<?attribute@incontext:border-left;'3.0pt solid #000000'?>
<?attribute@incontext:border-right;'3.0pt solid #000000'?>
<?end if?>

3pt borders is a little excessive but you get the idea. This approach can be used with the if@row option too to get the complete row borders to update. If your template will need to be run in left to right languages e.g. Arabic or Hebrew, then you will need to use start and end in place of left and right.

For the inquisitive reader, you're maybe wondering how, did this guy know that? And why the heck is this not in the user docs?
Other than my all knowing BIP guru status ;0) I hit the web for info on XSLFO cell border attributes and then the Template Builder for Word. Particularly the export option; I generated the XSLFO output from a test RTF template and took a look at the attributes. Then I started trying stuff out, Im a hacker and proud me!  For the users doc updates, I'll log a request for an update.

Tuesday Oct 30, 2012

OpenWorld Presentations and Anatomy of an RTF Template w/ files

For those who missed it ... or those who made it and couldn't get enough, check out the presentations delivered at OpenWorld:

Overview and Roadmap

The Reporting Platform for Oracle Applications

Best Practices

and even though it wasn't presented at OpenWorld an updated version of

Anatomy of an RTF Template

to include documented example files  (RTF template, Sub-Template and sample XML data) so you can re-use and play with the code directly. 

Huge thanks to Tim and Hok-Min who did all the hard, original work on this example loaded with tips and tricks.


Monday Sep 10, 2012

"Automation Error Unspecified Error" ... err Error

One the best error messages I have seen in a long time and I've seen some doozies! 

There have been a fare few internal emails flying over the past week about issues with the template builder for MSWord not working. The issue has been found, so if you are hitting some behaviour similar to this:

I have installed BI Publisher Desktop for 32 bit. I have to load the data from XML to RTF Template. As per instruction when I click on tab Sample XML nothing happen.

When I click on any other tab from BI Publisher menu, I am getting one error in pop-up menu “Automation Error Unspecified Error.

I am unable to open any of the tab of BI Publisher menu including help.

Have no fear, it's for once, not a BIP issue but a Microsoft one! Check here for what you need to do to resolve the error.

Thursday Apr 26, 2012

Macro Can not be Found Error

There have been messages on the forum and via email in the past few weeks about an issue that occurs with MS Word Template Builder. It appears that the latest MSOffice patch breaks all versions of the Template Builder prior to You'll get an error similar to: 

'The macro cannot be found or has been disabled'

It actually appears to not only break our plugin but any VBA based code that might be embedded inside MSWord.

Rather than re-regurgitate the current work around (we're assuming MS will get a fix out at some point) Im pointing you to Damir's blog entry here.

Jim from S&C Electric let me know of another solution:

We had a similar issue.

Our fix was the find the files with exd extensions and change the name so they were not available.

Maybe this will help.

Thanks Jim

Friday Feb 17, 2012

Rocky Mountain User Group Preso

For those of you that could not make the Rocky Mountain User Group session yesterday. Nikos, from the product management team has kindly loaded my presentation and the sample templates I showed, up to OTN. Its a bit of a monster so be patient.

Its worth 'running' the powerpoint for the fantastic comedic moments we shared in the room, well, kinda. You need my deep southern Louisiana accent for the full effect :0)

Thursday Dec 01, 2011

Dynamic Content using Sub Templates

I have written about sub templates in the past on a few occasions; the principle behind them is pretty simple. If you have common report components that can be shared across reports; be they blocks of text like standard contract clauses or maybe some common calculation or function, drop them into a sub template and share the love. Develop once, use everywhere!
A colleague was recently tasked with conditionally bringing into a report output, paragraphs of static text based on some user preferences. That’s an ideal candidate for a sub template approach; drop all of the paragraphs in to an RTF subtemplate and then just conditionally pull them in based on some boolean expressions.
You might, quite naturally think about conditionally importing a series of sub templates rather than defining one, with all the content. However, XSL does not allow the conditional import of sub templates so you must take the single template approach. You can of course, import multiple sub templates if you have a lot of content to bring in but in most cases I would expect a single sub template will suffice.

BIP does need to know what those paragraphs need to be for each user whether that’s as a set of parameter values or a data element in the incoming data set. For this example I have used both approaches and they work all flavors of BIP. Implementation of the sub template onto the servers is going to be a little different but the main principle is the same. I have mercilessly ripped out a nice graphic from Leslie’s (doc writer extraordinaire) documentation.

This is for the 11g version that supports loading sub templates into the report catalog as objects.  They can then be referenced in your main template using the import statement:


The subtemplate folder is going to be from the /SharedFolders  or /My Folders root. For instance, I have a sub template ‘paragraphs’ loaded into a ‘test’ folder under  Shared Folders. The import statement in my main template is ‘<?import:xdoxsl:///Test/ParaSubTemplate.xsb?>’

Update from Leslie

For those of you testing using your own My Folder area. The syn tax is

<?import:xdoxsl:///~username/path to subtemplate.xsb?> where username is your user name. For example: <?import:xdoxsl:///~tdexter/Subtemplates/Template1.xsb?>

Recommend you move them into the shared folder area in production.

For 10g you will either need to drop them into an accessible directory and use the file URI or mount them into the web server directory structure and access them via an http URI. I normally mount them in a directory under the ‘xmlpserver’ directory e.g J2EE_HOME\applications\xmlpserver\xmlpserver\subtemplates, a template is then accessible via the URI ‘http://server:port/subtemplates/template.rtf’

Make sure you set the Allow External References property to true for the report so that the sub template can be accessed.

The actual content of the sub template is pretty straight forward. It’s a series of paragraphs bounded by the ‘template’ command e.g.

<?end template?>
<?end template?>
<?end template?>
Now we have the dynamic content defined it’s a case of conditionally bringing it into the main template. For this example I have demonstrated two approaches; both rely on the required paragraph information to be in the main dataset:
1.    Using parameters to allow the user to select the appropriate paragraphs to be brought in. This means creating the parameters and ensuring that you have set the property on the data model to include the parameter values in the XML result set.

Once that’s done its just a simple case of using id statements to check if a given paragraph should be included:

<?if:.//PARA1='1'?><?call:para1?><?end if?>

This assumes my parameter is called PARA1 and that a ‘1’ means include it, it could easily be a ‘Y’ or ‘True’ value, you are just testing for it.

2.    Including a value in the data to define what paragraphs should be included. If you have stored what paragraphs should be included for a given entity i.e. customer, supplier, employee, etc. Then you can extract those values into the data set and test for them. For this demo I have a 5 character set of ‘1’s and ‘0’s to represent the paragraphs that need to be included e.g. 10110. I just use a substring command to find out if a particular paragraph needs to be included.

<?if:substring(.//PARAS,1,1)='1'?><?call:para1?><?end if?>

Where PARAS is the element holding the ‘1’s and ‘0’s string to be parsed.
You can of course use some other means of marking whether a paragraph needs to be included or not. It’s just a case of parsing out the values with a substring or similar command.
You should be able to generate dynamic content such as this:

 Notice that I have rendered the code so that I can see that the paragraphs are coming in i.e 10001 means we get paragraphs 1 and 5. I have built out demo files for the second method, available here.

Friday Sep 09, 2011

Wacky Week

Happy Friday! Its been a week of recovery after the exertions last week at the triathlon. After swimming 1/2 a mile and then riding 17 miles, halfway through the run I thought, why am I doing this? When I reached the finish, I realised why, to get a medal of course :0) The feeling of pride and the camaraderie of other competitors was great. Going back up the trail after I had finished to cheers others on and legitimately shout at my wife was great too :0) A good afternoon, but as I say, a bit sore come Monday morning. Got out on my bike this morning for the first time after a too busy work week for a nice 25 miles and it felt great ... Im not looking forward to the winter :0(

Yeah, we look a little red and tired and my eye is doing some droopy thang but we got medals! Quick write up here, if you're interested.

This week a I got a mail from down under, specifically from Peter Laning who works for Theiss out of Brisbane Australia. Peter has been working with the JD Edwards E1 product for about 18 months and BIP for about a year now with several reports in production and more in the pipe. OK, enough about Peter already, its what Peter attached to his mail that caused me to ask him if I could share with the BIP world thats really interesting. It was a spreadsheet full of all of the BIP functions he knew about. Rather flatteringly, he asked if I could peruse the list and add any I thought he had missed. I could not spot any immediately; its an awesome list and a great crib sheet for reference. Its applicable for all but the oldest installs and is based around the code line.

I have put the sheets up on GoogleDocs and made it public here. So 1. If you have functions to add, please do; 2. please feel free to copy/download it and use it and finally, 3. thank Peter for putting it together.

Have a good weekend, I'll be out early on Saturday doing the Wacky W bike ride, 55 miles with too many hills and not enough air in the dizzying heights of Douglas County, CO. I will of course, be sleeping most of Sunday :0)

Tuesday Mar 29, 2011

Template Builder Issues?

[Read More]

Wednesday Mar 10, 2010

Google gets Barcodey

[Read More]

Tuesday Feb 23, 2010

Text Output for BIP

[Read More]

Tuesday Nov 10, 2009

Whats in my data?

[Read More]

Monday Jun 08, 2009

Conditional Headers!

[Read More]

Thursday Oct 23, 2008

More Tree Mapping

[Read More]

Wednesday Oct 22, 2008

Tree Maps

[Read More]

Wednesday Jan 09, 2008

Colorful Groupings

[Read More]

Tuesday Sep 04, 2007

Save that BIPnalysis

[Read More]

Thursday Aug 30, 2007

Flex your BIP Muscles

[Read More]

Wednesday Aug 15, 2007

More Date Calculations

[Read More]

Tuesday Aug 14, 2007

Multi Currency Reports

[Read More]

Monday Aug 13, 2007

At last a JDE post!

[Read More]

Follow bipublisher on Twitter Find Us on Facebook BI Publisher Youtube ChannelDiscussion Forum

Join our BI Publisher community to get the most and keep updated with the latest news, How-to, Solutions! Share your feedback and let us hear your voice @bipublisher on Twitter, on our official Facebook page, and Youtube!


« July 2016