<%-- * Licensed Materials - Property of IBM * * 5724-U18 * * (C) COPYRIGHT IBM CORP. 2006, 2014 All Rights Reserved. * * US Government Users Restricted Rights - Use, duplication or * disclosure restricted by GSA ADP Schedule Contract with * IBM Corp. --%> <%@ page language="java" %> <%@ page contentType="text/html; charset=utf-8" %> <%-- The ReportEncryption class is required for decrypting passwords. It is included in encrypt.jar, which should be taken from \reports\eri and made available to the web application running this JSP file (for example by placing it in the WEB-INF\lib directory). --%> <%@ page import="psdi.util.ReportEncryption,psdi.util.HTML" %> <% response.setHeader("Cache-Control","no-cache"); //HTTP 1.1 response.setHeader("Pragma","no-cache"); //HTTP 1.0 response.setDateHeader ("Expires", 0); //prevents caching at the proxy server %> <% String reportFile=null; String reportDesc=null; String reportFolder=null; String reportType=null; String userName=null; String password=null; String ParmUserName=null; String ParmPassword=null; String mroDBType=null; String schema=null; String where=null; String mroOrg=null; String mroSite=null; String baseTable=null; String appname=null; String mroLangCode=null; String locale=null; String localTZ=null; String customserverURL=null; String customrptServerLogonPass=null; String reportFileTemp = HTML.decode((String)request.getParameter("reportFile")); if(reportFileTemp != null) reportFile = HTML.securitySafeWithHTMLEncoding(reportFileTemp); String reportDescTemp = HTML.decode((String)request.getParameter("reportDesc")); if(reportDescTemp != null) reportDesc = HTML.securitySafeWithHTMLEncoding(reportDescTemp); String reportFolderTemp = HTML.decode((String)request.getParameter("reportFolder")); if(reportFolderTemp != null) reportFolder = HTML.securitySafeWithHTMLEncoding(reportFolderTemp); String reportTypeTemp = HTML.decode((String)request.getParameter("reportType")); if(reportTypeTemp != null) reportType = HTML.securitySafeWithHTMLEncoding(reportTypeTemp); String userNameTemp = HTML.decode((String)request.getParameter("userName")); if(userNameTemp != null) userName = HTML.securitySafeWithHTMLEncoding(userNameTemp); String passwordTemp = HTML.decode((String)request.getParameter("maxPass")); if(passwordTemp != null) password = HTML.securitySafeWithHTMLEncoding(passwordTemp); String ParmUserNameTemp = HTML.decode((String)request.getParameter("ParmUserName")); if(ParmUserNameTemp != null) ParmUserName = HTML.securitySafeWithHTMLEncoding(ParmUserNameTemp); String ParmPasswordTemp = HTML.decode((String)request.getParameter("ParmPassword")); if(ParmPasswordTemp != null) ParmPassword = HTML.securitySafeWithHTMLEncoding(ParmPasswordTemp); String mroDBTypeTemp = HTML.decode((String)request.getParameter("mroDBType")); if(mroDBTypeTemp != null) mroDBType = HTML.securitySafeWithHTMLEncoding(mroDBTypeTemp); String schemaTemp = HTML.decode((String)request.getParameter("schema")); if(schemaTemp != null) schema = HTML.securitySafeWithHTMLEncoding(schemaTemp); String whereTemp = HTML.decode((String)request.getParameter("where")); if(whereTemp != null) where = HTML.securitySafeWithHTMLEncoding(whereTemp); String mroOrgTemp = HTML.decode((String)request.getParameter("mroOrg")); if(mroOrgTemp != null) mroOrg = HTML.securitySafeWithHTMLEncoding(mroOrgTemp); String mroSiteTemp = HTML.decode((String)request.getParameter("mroSite")); if(mroSiteTemp != null) mroSite = HTML.securitySafeWithHTMLEncoding(mroSiteTemp); String baseTableTemp = HTML.decode((String)request.getParameter("baseTable")); if(baseTableTemp != null) baseTable = HTML.securitySafeWithHTMLEncoding(baseTableTemp); String appnameTemp = HTML.decode((String)request.getParameter("appname")); if(appnameTemp != null) appname = HTML.securitySafeWithHTMLEncoding(appnameTemp); String mroLangCodeTemp = HTML.decode((String)request.getParameter("mroLangCode")); if(mroLangCodeTemp != null) mroLangCode = HTML.securitySafeWithHTMLEncoding(mroLangCodeTemp); String localeTemp = HTML.decode((String)request.getParameter("locale")); if(localeTemp != null) locale = HTML.securitySafeWithHTMLEncoding(localeTemp); String localTZTemp = HTML.decode((String)request.getParameter("localTZ")); if(localTZTemp != null) localTZ = HTML.securitySafeWithHTMLEncoding(localTZTemp); String customserverURLTemp = HTML.decode((String)request.getParameter("customserverURL")); if(customserverURLTemp != null) customserverURL = HTML.securitySafeWithHTMLEncoding(customserverURLTemp); String customrptServerLogonPassTemp = HTML.decode((String)request.getParameter("customrptServerLogonPass")); if(customrptServerLogonPassTemp != null) customrptServerLogonPass = HTML.securitySafeWithHTMLEncoding(customrptServerLogonPassTemp); // Decrypt passwords try { // Database password ParmPassword = ReportEncryption.decrypt(ParmPassword, true); // User password password = ReportEncryption.decrypt(password, true); // Custom report server password if (!customrptServerLogonPass.equals("")) { customrptServerLogonPass = ReportEncryption.decrypt(customrptServerLogonPass, true); } } catch (Exception e) { System.out.println(e.getMessage()); } %> Maximo Custom Report Integration

The table below displays the standard values passed as request parameters from Maximo. Additional values may be passed in the following ways:

Maximo System Properties

All customer-defined properties having names beginning with mxe.report.custom will be passed as parameters to this page. The request parameter name will be the word custom prepended to the last segment of the property name. For example, a property named:
   mxe.report.custom.databasename
would be accessed as follows (Note that HTML.cleanHtml does not take null value, check the source .jsp file for example):
   String dbName = HTML.cleanHtml(HTML.decode((String)request.getParameter("customdatabasename")), false);

Report parameters

All report parameters will be passed. The value in the Parameter Name field in the report definition will be used as the request parameter name. For example, the location parameter from Summary of Asset Failures would be accessed as follows (Note that HTML.cleanHtml does not take null value, check the source .jsp file for example):
   String loc = HTML.cleanHtml(HTML.decode((String)request.getParameter("location")), false);
If the parameter is bound, it will also be included in the where clause so the individual value may not be needed, but it is always available.

Standard Maximo values

Report File Name<%=reportFile%>
Report Description<%=reportDesc%>
Report Folder<%=reportFolder%>
Report Type<%=reportType%>
Maximo User Name<%=userName%>
Maximo PasswordSee file source for details
Database User Name<%=ParmUserName%>
Database PasswordSee file source for details
Schema<%=schema%>
Maximo Where Clause<%=where%>
User Org<%=mroOrg%>
User Site<%=mroSite%>
App Main Table<%=baseTable%>
App Name<%=appname%>
Language Code<%=mroLangCode%>
Locale<%=locale%>
User's Local Timezone<%=localTZ%>
Report Server URL<%=customserverURL%>
Report Server PasswordSee file source for details