Home DevShare Using BIRT with Maximo

How to embed a .js file into Maximo BIRT report

Share

by jverly01

Forum - 25 postsDevShare - 5 postsContributor Contest - 1 winLeaderboard - 1 time
Posted 10 May 2012 - 08:00 AM

(0)  (0)   (270 views)

BIRT allows users to use an external javascript file. This post shows how to test, embed and use a .js file for Maximo BIRT reports.

Birt Version:-2.6

One of the common tasks a Maximo report writer has is to make the data in the report as easy to understand as possible. Sometimes that includes modifying the case of a text element - either to upper or lower case. But what about proper case text transformations? Out of the box, BIRT doesn't have a proper case text transformation function (e.g. UPPER CASE -> Proper Case). This article describes how to use an external javascript function to include a proper case text transform in your report and then how to embed the .js file into your BIRT report after it's imported into Maximo.

http://theothersideof.mygeekdaddy.net/2012/how-to-embed-js-files-into-birt-report-for-maximo/


Forum - 100 postsDevShare - 25 postsPoll VoterLeaderboard - 10 times

mblock

Posted: 19 Jun 2012 - 01:18 PM

This is awesome. I always wondered how Maximo deals with resources. Can I do the same for other resources such as libraries and images?

Forum - 25 postsDevShare - 5 postsContributor Contest - 1 winLeaderboard - 1 time

jverly01

Posted: 20 Jun 2012 - 03:01 PM

In Maximo (at least v7.1.x and v7.5.x) the library file is separate import and is a global file for all BIRT reports in Maximo. Images are typically are either embedded or referenced to a folder on the MX server - e.g. the IBM

Forum - 25 postsDevShare - 5 postsContributor Contest - 1 winLeaderboard - 1 time

jverly01

Posted: 06 Jul 2012 - 09:21 AM

Some initial testing has worked by including any files to be uploaded in a single zip file. I'll post more when more extensive testing is complete.

Forum - 100 postsDevShare - 25 postsPoll VoterLeaderboard - 10 times

mblock

Posted: 06 Jul 2012 - 09:22 AM

Very good to know.

Forum - 1 post

Rani

Posted: 02 Sep 2012 - 06:40 AM

Hi, birt 2.3.2 with maximo 7115 I followed above steps with the function getUserName, It is good in pdf but webviewer Report displays the data at the end I am getting an error org.mozilla.javascript.EcmaError: ReferenceError: "getUserName" is not defined

Forum - 25 postsDevShare - 5 postsContributor Contest - 1 winLeaderboard - 1 time

jverly01

Posted: 04 Sep 2012 - 01:58 PM

Just to clarify, you can get your custom .js fuction to work in BIRT Report Designer and if it is exported to PDF in Maximo, but when just viewing the report in Maximo you get the error message you mentioned below. Correct? If so, cut/paste .js function.
 
Filter More