Browse Source

REPORT-55243:如果修改了报表引擎属性,则返回布尔值,以判断是否需要重新预编译

research/11.0
fly.li 3 years ago
parent
commit
e9b026ea88
  1. 7
      designer-base/src/main/java/com/fr/nx/app/designer/utils/CptCompileUtil.java

7
designer-base/src/main/java/com/fr/nx/app/designer/utils/CptCompileUtil.java

@ -45,6 +45,7 @@ public class CptCompileUtil {
} }
TransformResultInfo resultInfo = compile0(workbook, file); TransformResultInfo resultInfo = compile0(workbook, file);
unSupportLog(resultInfo); unSupportLog(resultInfo);
} }
public static TransformResultInfo compile0(WorkBook workbook, FILE file) { public static TransformResultInfo compile0(WorkBook workbook, FILE file) {
@ -137,11 +138,12 @@ public class CptCompileUtil {
/* /*
* 该另存为流程会改变文件内容现在作为兼容的流程以后可以随时删除该流程 * 该另存为流程会改变文件内容现在作为兼容的流程以后可以随时删除该流程
* */ * */
public static void changeFrEngineAttr(String oldName, JTemplate jTemplate){ public static boolean changeFrEngineAttr(String oldName, JTemplate jTemplate){
FILE editingFILE = jTemplate.getEditingFILE(); FILE editingFILE = jTemplate.getEditingFILE();
String path = editingFILE.getPath(); String path = editingFILE.getPath();
//只有在旧文件是cptx文件并且新文件是cpt文件时才会改变报表引擎属性 //只有在旧文件是cptx文件并且新文件是cpt文件时才会改变报表引擎属性
if (oldName.endsWith(".cptx") && path.endsWith(".cpt")){ boolean isChange = oldName.endsWith(".cptx") && path.endsWith(".cpt");
if (isChange){
WorkBook target = (WorkBook)jTemplate.getTarget(); WorkBook target = (WorkBook)jTemplate.getTarget();
WorkSheet workSheet = (WorkSheet)target.getReport(0); WorkSheet workSheet = (WorkSheet)target.getReport(0);
LayerReportAttr layerReportAttr = workSheet.getLayerReportAttr(); LayerReportAttr layerReportAttr = workSheet.getLayerReportAttr();
@ -152,6 +154,7 @@ public class CptCompileUtil {
layerReportAttr.setClientPaging(true); layerReportAttr.setClientPaging(true);
layerReportAttr.setNewEngine(true); layerReportAttr.setNewEngine(true);
} }
return isChange;
} }
public static boolean isNewEngine(Object workBook){ public static boolean isNewEngine(Object workBook){

Loading…
Cancel
Save