|
|
|
@ -45,6 +45,7 @@ public class CptCompileUtil {
|
|
|
|
|
} |
|
|
|
|
TransformResultInfo resultInfo = compile0(workbook, file); |
|
|
|
|
unSupportLog(resultInfo); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
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(); |
|
|
|
|
String path = editingFILE.getPath(); |
|
|
|
|
//只有在旧文件是cptx文件并且新文件是cpt文件时才会改变报表引擎属性
|
|
|
|
|
if (oldName.endsWith(".cptx") && path.endsWith(".cpt")){ |
|
|
|
|
boolean isChange = oldName.endsWith(".cptx") && path.endsWith(".cpt"); |
|
|
|
|
if (isChange){ |
|
|
|
|
WorkBook target = (WorkBook)jTemplate.getTarget(); |
|
|
|
|
WorkSheet workSheet = (WorkSheet)target.getReport(0); |
|
|
|
|
LayerReportAttr layerReportAttr = workSheet.getLayerReportAttr(); |
|
|
|
@ -152,6 +154,7 @@ public class CptCompileUtil {
|
|
|
|
|
layerReportAttr.setClientPaging(true); |
|
|
|
|
layerReportAttr.setNewEngine(true); |
|
|
|
|
} |
|
|
|
|
return isChange; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static boolean isNewEngine(Object workBook){ |
|
|
|
|