public static void handleBeforeFactory(ReportDesignHandle report, ExecutionContext context) {
   try {
     IDesignElement element = SimpleElementFactory.getInstance().getElement(report);
     IReportDesign reportDesign = new ReportDesign(report);
     String scriptText = report.getBeforeFactory();
     Expression.Script scriptExpr = null;
     if (null != scriptText) {
       String id =
           ModuleUtil.getScriptUID(
               report.getPropertyHandle(IReportDesignModel.BEFORE_FACTORY_METHOD));
       scriptExpr = Expression.newScript(scriptText);
       scriptExpr.setFileName(id);
     }
     if (handleScript(element, scriptExpr, context).didRun()) return;
     IReportEventHandler eh = (IReportEventHandler) getInstance(report, context);
     if (eh != null) eh.beforeFactory(reportDesign, context.getReportContext());
   } catch (Exception e) {
     addException(context, e, report);
   }
 }
Beispiel #2
0
 /**
  * Constructors.
  *
  * @param item
  */
 public SimpleRowItem(ExtendedItemHandle item) {
   this.item =
       SimpleElementFactory.getInstance()
           .wrapExtensionElement(item, ISimpleElementFactory.SIMPLE_ROW_ITEM);
 }