diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java index 936f6fe119..b77f8dce27 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/TableDataBeanHelper.java @@ -117,7 +117,7 @@ public class TableDataBeanHelper { if (connection != null) { tableData.setDatabase(new NameDatabaseConnection(bean.getDatabase())); } else { - throw new RuntimeException("not find conn by " + bean.getDatabase()); + FineLoggerFactory.getLogger().error("not find conn by {}", bean.getDatabase()); } String sql = SqlUtils.clearSqlComments(DataEncryptionHelper.decrypt(bean.getQuery())); Parameter[] parameters = new Parameter[bean.getParameters().size()]; diff --git a/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java b/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java index 371e952baf..46e575e439 100644 --- a/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java +++ b/designer-realize/src/main/java/com/fr/design/actions/file/newReport/NewWorkBookAction.java @@ -3,6 +3,7 @@ package com.fr.design.actions.file.newReport; import com.fr.base.svg.IconUtils; import com.fr.design.actions.UpdateAction; +import com.fr.design.cache.DesignCacheManager; import com.fr.design.mainframe.DesignerContext; import com.fr.design.mainframe.JWorkBook; import com.fr.design.menu.MenuKeySet; @@ -35,7 +36,7 @@ public class NewWorkBookAction extends UpdateAction { * @param e 事件 */ public void actionPerformed(ActionEvent e) { - DesignerContext.getDesignerFrame().addAndActivateJTemplate(new JWorkBook()); + DesignCacheManager.processByCacheTableData(() -> DesignerContext.getDesignerFrame().addAndActivateJTemplate(new JWorkBook())); } public static final MenuKeySet NEW_WORK_BOOK = new MenuKeySet() {