From 4d23fc467abcad1e1aa0ac0deec927934fc2ae66 Mon Sep 17 00:00:00 2001 From: Rosie <3392418386@qq.com> Date: Tue, 15 Dec 2020 14:08:15 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8-https://help.fanruan.com/finereport/doc-view?= =?UTF-8?q?-685.html=20=E5=B8=AE=E5=8A=A9=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E5=BC=80=E5=8F=91=E6=A8=A1=E5=9D=97=EF=BC=8C?= =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=BD=91=E7=BB=9C=E6=8A=A5=E8=A1=A8=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E4=B8=AD=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E7=9A=84?= =?UTF-8?q?=E7=A4=BA=E4=BE=8B=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/demo/SimpleReportletDemoFrm.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/main/java/com/fr/demo/SimpleReportletDemoFrm.java diff --git a/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java b/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java new file mode 100644 index 0000000..437c889 --- /dev/null +++ b/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java @@ -0,0 +1,34 @@ +package com.fr.demo; + +import java.util.Map; +import javax.servlet.http.HttpServletRequest; + +import com.fr.form.main.Form; +import com.fr.form.main.FormIO; +import com.fr.web.weblet.Formlet; + + +public class SimpleReportletDemoFrm extends Formlet { + + @SuppressWarnings("rawtypes") + @Override + public void setParameterMap(Map arg0) { + // TODO Auto-generated method stub + + } + + @Override + protected Form createForm(HttpServletRequest request) throws Exception { + Form form = null; + //模板的相对路径 + String tplPath = "//doc//frm//决策报表入门.frm"; + this.setTplPath(tplPath); + try { + form = FormIO.readForm(tplPath); + } catch (Exception e) { + e.printStackTrace(); + } + return form; + } + +} \ No newline at end of file From cb4e9b9a7e45d2db8f269d83591a4adcfd94db44 Mon Sep 17 00:00:00 2001 From: Rosie <3392418386@qq.com> Date: Tue, 15 Dec 2020 15:11:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=A8=8B=E5=BA=8F=E7=BD=91=E7=BB=9C?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8-https://help.fanruan.com/finereport/doc-view?= =?UTF-8?q?-685.html=20=E5=86=B3=E7=AD=96=E6=8A=A5=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B=E4=BB=A3=E7=A0=81=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/fr/demo/SimpleReportletDemoFrm.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java b/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java index 437c889..a3862fd 100644 --- a/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java +++ b/src/main/java/com/fr/demo/SimpleReportletDemoFrm.java @@ -5,12 +5,12 @@ import javax.servlet.http.HttpServletRequest; import com.fr.form.main.Form; import com.fr.form.main.FormIO; +import com.fr.log.FineLoggerFactory; import com.fr.web.weblet.Formlet; public class SimpleReportletDemoFrm extends Formlet { - @SuppressWarnings("rawtypes") @Override public void setParameterMap(Map arg0) { // TODO Auto-generated method stub @@ -26,7 +26,7 @@ public class SimpleReportletDemoFrm extends Formlet { try { form = FormIO.readForm(tplPath); } catch (Exception e) { - e.printStackTrace(); + FineLoggerFactory.getLogger().error(e.getMessage(), e); } return form; }