コード例 #1
0
 public JRDesignGroup getGroup(DRIDesignGroup group) {
   JRDesignGroup jrGroup =
       (JRDesignGroup) accessor.getDesign().getGroupsMap().get(group.getName());
   if (jrGroup == null)
     throw new JasperDesignException("Group " + group.getName() + " is not registered");
   return jrGroup;
 }
コード例 #2
0
 public void transformExpressions() {
   for (DRIDesignGroup group : accessor.getReport().getGroups()) {
     getGroup(group)
         .setExpression(
             accessor.getExpressionTransform().getExpression(group.getGroupExpression()));
   }
 }
コード例 #3
0
 private JRDesignGroup group(DRIDesignGroup group) {
   JRDesignGroup jrGroup = new JRDesignGroup();
   jrGroup.setName(group.getName());
   jrGroup.setReprintHeaderOnEachPage(group.isReprintHeaderOnEachPage());
   jrGroup.setStartNewColumn(group.isStartInNewColumn());
   jrGroup.setStartNewPage(group.isStartInNewPage());
   jrGroup.setResetPageNumber(group.isResetPageNumber());
   if (group.getMinHeightToStartNewPage() != null) {
     jrGroup.setMinHeightToStartNewPage(group.getMinHeightToStartNewPage());
   }
   jrGroup.setFooterPosition(ConstantTransform.groupFooterPosition(group.getFooterPosition()));
   jrGroup.setKeepTogether(group.isKeepTogether());
   return jrGroup;
 }
コード例 #4
0
 private void addGroup(DRIDesignGroup group) {
   try {
     JRDesignGroup jrGroup = group(group);
     accessor.getDesign().addGroup(jrGroup);
   } catch (JRException e) {
     throw new JasperDesignException(
         "Registration failed for group \"" + group.getName() + "\"", e);
   }
 }