diff --git a/UserClass/PrintHelper.cs b/UserClass/PrintHelper.cs index d405334..f9ab9e4 100644 --- a/UserClass/PrintHelper.cs +++ b/UserClass/PrintHelper.cs @@ -69,6 +69,36 @@ namespace formula_manage.UserClass return new Tuple(flag, msg); } + /// + /// 设计 + /// + /// 模板 + /// + public static Tuple Design(string frxPath) + { + bool flag = false; + string msg = ""; + FastReport.Report report = new FastReport.Report(); + try + { + report.Load(frxPath); + report.DoublePass = true; + + report.Design(); + flag = true; + msg = "Designer Open"; + } + catch (Exception ex) + { + flag = false; + msg = ex.Message; + } + finally + { + report.Dispose(); + } + return new Tuple(flag, msg); + } /// /// 设计 /// @@ -76,7 +106,7 @@ namespace formula_manage.UserClass /// 字典参数 /// 数据源 /// - public static Tuple Design(string frxPath, Dictionary dicParam, DataSet dsDataSource) + public static Tuple Designs(string frxPath, Dictionary dicParam, DataSet dsDataSource) { bool flag = false; string msg = ""; @@ -103,7 +133,7 @@ namespace formula_manage.UserClass report.Design(); flag = true; - msg = "设计器打开成功"; + msg = "Designer Open"; } catch (Exception ex) { diff --git a/Windows/Print.xaml b/Windows/Print.xaml index e245ca2..fc7f68d 100644 --- a/Windows/Print.xaml +++ b/Windows/Print.xaml @@ -8,7 +8,7 @@ Title="打印设置" Height="500" Width="500" MaxWidth="500"> - +