diff --git a/README.md b/README.md index d68fef5..dc376db 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,12 @@ server=ip地址;port=5432;uid=用户;pwd=口令;database=数据库;Pooling=true; 达梦 连接串 格式 Server=ip地址:端口; UserId=用户; PWD=口令; + +高斯数据库,使用 pgsql 驱动,一定要带`No Reset On Close=true;` : +PORT=端口;searchpath=schema名称1,schema名称2;DATABASE=db_test;HOST=ip地址;PASSWORD=口令;USER ID=用户;No Reset On Close=true; + +OceanBase (oracle模式)连接串 odbc格式示例: +Driver=Server=ip地址;Port=端口;Database=XIR_TRD;User=XIR_TRD@Xpia2C6G#obtest:1650773680;Password=口令;Option=3; ``` 配置完毕后,按F5 刷新页面,点报表目录,正常的话,这是应该能看到所有的测试报表了 diff --git a/end/CellReport.dll b/end/CellReport.dll index 46617a5..578b36a 100644 Binary files a/end/CellReport.dll and b/end/CellReport.dll differ diff --git a/end/reportWeb/Controllers/DesignController.cs b/end/reportWeb/Controllers/DesignController.cs index 716f669..77abcbf 100644 --- a/end/reportWeb/Controllers/DesignController.cs +++ b/end/reportWeb/Controllers/DesignController.cs @@ -149,7 +149,7 @@ public async Task Preview(String _content, String _ConnectionId, foreach (var one in this.rpt_group.db_connection_list) { - report_env.addDataSource(one.name, one.conn_str, one.db_type, "0"); + report_env.addDataSource(one.name, one.conn_str, one.db_type, "0", one.sql_prefix, one.sql_suffix); } ParamDefineDataSet pds = report_env.getParamDefineDataSet(); foreach (var row in pds.Rows) @@ -278,7 +278,7 @@ public async Task Preview(String _content, String _ConnectionId, } await my_out_act(); } - report_env.logger.Debug($"输出用时:{(DateTime.Now.Ticks - start) / 10000000.0}秒"); + report_env.logger.Debug($"总用时:{(DateTime.Now.Ticks - start) / 10000000.0}秒"); //if (String.IsNullOrEmpty(fresh_ds)) //{ //} @@ -376,7 +376,7 @@ public async Task exec_expr(String expr, String report_content) report_env.logger = logger; foreach (var one in this.rpt_group.db_connection_list) { - report_env.addDataSource(one.name, one.conn_str, one.db_type, "0"); + report_env.addDataSource(one.name, one.conn_str, one.db_type, "0", one.sql_prefix, one.sql_suffix); } var exec_result = exprFaced.calculate("{ " + expr + "\n}", cur_GroupMap, "当前脚本"); diff --git a/end/reportWeb/Pages/ReportModel.cs b/end/reportWeb/Pages/ReportModel.cs index d994a9d..4d32791 100644 --- a/end/reportWeb/Pages/ReportModel.cs +++ b/end/reportWeb/Pages/ReportModel.cs @@ -153,7 +153,7 @@ public async Task Page_Load() foreach (var one in this.rpt_group.db_connection_list) { - report_env.addDataSource(one.name, one.conn_str, one.db_type, "0"); + report_env.addDataSource(one.name, one.conn_str, one.db_type, "0", one.sql_prefix, one.sql_suffix); } var exprFaced = report_env.getExprFaced(); exprFaced.addVariable("isPhone", isPhone); diff --git a/end/reportWeb/ReportDb.cs b/end/reportWeb/ReportDb.cs index ee62638..38029eb 100644 --- a/end/reportWeb/ReportDb.cs +++ b/end/reportWeb/ReportDb.cs @@ -218,7 +218,11 @@ CREATE INDEX IF NOT EXISTS IX_Rpt_db_connection_grp_id ON Rpt_db_connection ( { db.Statement("alter table Rpt_db_connection add column sql_prefix text"); }; - + if (0 == db.Select(" SELECT * FROM pragma_table_info('Rpt_db_connection') where name='sql_suffix'").Count()) + { + db.Statement("alter table Rpt_db_connection add column sql_suffix text"); + }; + var rpt_config = db.Query("Rpt_config").First(); CellReport.util.KeyAndPassword.yan_zheng_zcm(rpt_config.zcm); @@ -274,6 +278,8 @@ public class Rpt_db_connection public string conn_str { get; set; } public string test_conn_str { get; set; } public string sql_prefix { get; set; } + public string sql_suffix { get; set; } + } public class Rpt_config { diff --git a/end/reportWeb/reportWeb.csproj b/end/reportWeb/reportWeb.csproj index a258c81..dec9449 100644 --- a/end/reportWeb/reportWeb.csproj +++ b/end/reportWeb/reportWeb.csproj @@ -30,16 +30,9 @@ - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - true - + diff --git a/end/reportWeb/template.xml b/end/reportWeb/template.xml index 11b204d..8416757 100644 --- a/end/reportWeb/template.xml +++ b/end/reportWeb/template.xml @@ -620,29 +620,5 @@ function 字典_${para.table}(){ } ]]> - - Array,System.Array, - Math, System.Math, - Convert, System.Convert, - String, System.String, - DateTime, System.DateTime, - Date, System.DateOnly, - TimeSpan,System.TimeSpan, - DateTimeOffset, System.DateTimeOffset, - DateTimeKind, System.DateTimeKind, - Double, System.Double, - Decimal, System.Decimal, - Bool, System.Boolean, - Int, System.Int32, - Int64, System.Int64, - DynObject,System.Dynamic.ExpandoObject, - Guid,System.Guid, - Uri,System.Uri, - Exception,System.Exception, - Task,System.Threading.Tasks.Task, - RandomNumber,System.Security.Cryptography.RandomNumberGenerator, - Direction,CellReport.cell.Direction - CellProperty,CellReport.cell.Property - CellRange,CellReport.cell.CellRange - + diff --git a/front/src/views/rpt_design/manger.vue b/front/src/views/rpt_design/manger.vue index a7ce637..67732ef 100644 --- a/front/src/views/rpt_design/manger.vue +++ b/front/src/views/rpt_design/manger.vue @@ -223,7 +223,8 @@ export default { {type: 'input',label: '名称',span: 12,display: true,prop: 'name'}, {type: 'select',label: '类型',span: 12,display: true,prop: 'db_type',dicData:this.db_type_dict }, {type: 'input',label: '连接串',span: 24, cell: true,display: true,prop: 'conn_str'}, - {type: 'textarea',label: 'sql前缀语句',span: 24, cell: true,display: true,prop: 'sql_prefix'} + {type: 'textarea',label: 'sql前缀语句(非select)',span: 24, cell: true,display: true,prop: 'sql_prefix'}, + {type: 'textarea',label: 'sql后缀语句(非select)',span: 24, cell: true,display: true,prop: 'sql_suffix'} ] }} },