6/27/2014

IBM Maximo® Version 7 Portrait Report Templates

 7.1.1.5 and later, 7.5 and later

Description:

IBM® Maximo® delivers landscape report templates to enable clients to create custom reports.  Landscape templates are delivered so the maximum number of fields can be displayed on a report.

However, to enable clients to meet their unique business needs, a set of portrait report templates is provided here.

6/26/2014

Useful java class: GetStartFinishDateTimeOfWeekOfDay

package custom;
import java.util.Date;
import java.util.Locale;

import com.ibm.icu.util.Calendar;

public class GetStartFinishDateTimeOfWeekOfDay {

  public static Date GetStartDateTimeOfDay(Date reportDate) {

   Calendar cal = Calendar.getInstance(new Locale("ru", "UA"));
   cal.setTime(reportDate);
   cal.set(Calendar.MILLISECONDS_IN_DAY, 0);
   reportDate = cal.getTime();

   return reportDate;

  }

  public static Date GetFinishDateTimeOfDay(Date reportDate) {

   Calendar cal = Calendar.getInstance(new Locale("ru", "UA"));
   cal.setTime(reportDate);
   cal.set(Calendar.MILLISECONDS_IN_DAY, 86399999);
   reportDate = cal.getTime();

   return reportDate;

  }

  public static Date GetStartDateTimeOfWeek(Date reportDate) {

   Calendar cal = Calendar.getInstance(new Locale("ru", "UA"));
   cal.setTime(reportDate);
   cal.setFirstDayOfWeek(Calendar.MONDAY);
   cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY);
   cal.set(Calendar.MILLISECONDS_IN_DAY, 0);
   Date startWeekDate = cal.getTime();

   return startWeekDate;

  }

  // last day is Sunday
  public static Date GetFinishDateTimeOfWeek(Date reportDate) {

   Calendar cal = Calendar.getInstance(new Locale("ru", "UA"));
   cal.setTime(reportDate);
   cal.setFirstDayOfWeek(Calendar.MONDAY);
   cal.set(Calendar.DAY_OF_WEEK, Calendar.SUNDAY);
   cal.set(Calendar.MILLISECONDS_IN_DAY, 86399999);
   Date finishWeekDate = cal.getTime();

   return finishWeekDate;

  }

  // last day is Friday
  public static Date GetFinishDateTimeOfWeek_Work(Date reportDate) {

   Calendar cal = Calendar.getInstance(new Locale("ru", "UA"));
   cal.setTime(reportDate);
   cal.setFirstDayOfWeek(Calendar.MONDAY);
   cal.set(Calendar.DAY_OF_WEEK, Calendar.FRIDAY);
   cal.set(Calendar.MILLISECONDS_IN_DAY, 86399999);
   Date finishWeekDate = cal.getTime();

   return finishWeekDate;

  }

}

6/06/2014

Hide data conditionally for a specific group

A very typical customization task is to restrict the visibility of data within Maximo/TPAE applications based on certain conditions.
For example you may wish to hide all the purchase orders that have a total costs higher than 1000$ for a specific group. Here is a small tutorial about how you can achieve this.

Open Administration - Conditional Expression Manager application and create the following conditional expression.

  • Condition: POCOST
  • Description: Total cost is less than 1000
  • Type: EXPRESION
  • Expression: totalcost<1000



Now go to the Security - Security Groups application. Choose the desired group and open theData Restrictions tab.
Create the following Object Restriction:

  • Object: PO
  • Type: QUALIFIED
  • Reevaluate: true
  • Condition: POCOST




If you now logon with a user belonging to the chosen group and open the Purchase Orders application you will see that only POs with a total cost of less than 1000 will be listed.

There are three types of object restrictions that may be used to accomplish different goals:
  • Hidden: The objects for which the condition is evaluated to true will be displayed as XXXXX and cannot be selected.
  • Qualified: The objects for which the condition is evaluated to false will be hidden.
  • Readonly: The objects for which the condition is evaluated to true cannot be updated.