diff --git a/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java b/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java index 668700a95e..3074bb009a 100644 --- a/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java +++ b/designer-realize/src/main/java/com/fr/design/report/PageSetupPane.java @@ -779,7 +779,7 @@ public class PageSetupPane extends BasicPane { //使用科学计数法显示长度的时候,限制纵向显示长度为9位 if (h_str.contains(E)) { String str1 = h_str.substring(h_str.indexOf(E)); - String str2 = h_str.substring(0, 9 - str1.length()); + String str2 = h_str.substring(0, Math.min(h_str.length(), 9) - str1.length()); h_str = str2 + str1; } else if (h_str.indexOf(CoreConstants.DOT) > 0) { h_str = h_str.substring(0, h_str.indexOf(CoreConstants.DOT) + 2);