From c27b814001240b529b923f65887c9d380c46da4d Mon Sep 17 00:00:00 2001 From: guy Date: Fri, 4 Jun 2004 11:29:11 +0000 Subject: [PATCH] Patch level : 2.1 nopatch Files correlati : Ricompilazione Demo : [ ] Commento : Correzionio editor di report e di query git-svn-id: svn://10.65.10.50/trunk@12148 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ba/ba8200.cpp | 13 +++++++++++-- ba/ba8300.cpp | 35 ++++++++++++++--------------------- ba/ba8300.h | 2 -- ba/ba8300a.uml | 18 ++++-------------- 4 files changed, 29 insertions(+), 39 deletions(-) diff --git a/ba/ba8200.cpp b/ba/ba8200.cpp index 2486799a5..4c51bd87c 100755 --- a/ba/ba8200.cpp +++ b/ba/ba8200.cpp @@ -708,6 +708,17 @@ void TQuery_mask::sheet2sql() expr_to = row->get(6); expr_to.trim(); if (expr_from.not_empty() || expr_to.not_empty()) { + if (expr_from.not_empty() && expr_from[0] != '\'' && !isdigit(expr_from[0])) + { + expr_from.insert("'"); + expr_from << '\''; + } + if (expr_to.not_empty() && expr_to[0] != '\'' && !isdigit(expr_to[0])) + { + expr_to.insert("'"); + expr_to << '\''; + } + if (expr_from == expr_to) { add_where_clause(where, field, "=", expr_from); @@ -751,9 +762,7 @@ void TQuery_mask::sheet2isam() TString use; FOR_EACH_ARRAY_ROW(rel, i, row) - { use << *row << '\n'; - } set(F_SQL, use, true); _sql_dirty = false; diff --git a/ba/ba8300.cpp b/ba/ba8300.cpp index 558a6a957..c8bf0bd5a 100755 --- a/ba/ba8300.cpp +++ b/ba/ba8300.cpp @@ -877,8 +877,8 @@ void TReport_mask::on_print() #else TReport_book book; #endif - if (book.add(_report)) - book.print_or_preview(); + book.add(_report); + book.print_or_preview(); } TReport_section& TReport_mask::curr_section() @@ -898,19 +898,19 @@ void TReport_mask::select_section() const char type = _curr_section->type(); const int level = _curr_section->level(); - char htype = 'H', ftype = 'F'; - int hlevel = level, flevel = level; + char htype = 'H'; + int hlevel = level; switch (type) { case 'H': { if (level <= 1) - hlevel = flevel = 1-level; + hlevel = 1-level; else { if (_report.find_section('H', level-1)) - hlevel = flevel = level-1; + hlevel = level-1; } } break; @@ -918,22 +918,22 @@ void TReport_mask::select_section() { if (level >= 1) { - hlevel = flevel = _report.find_max_level('H'); + hlevel = _report.find_max_level('H'); if (hlevel <= 1) - hlevel = flevel = 0; + hlevel = 0; } else - hlevel = flevel = 0; + hlevel = 0; } break; case 'F': { if (level <= 1) - hlevel = flevel = 1-level; + hlevel = 1-level; else { if (_report.find_section('F', level-1)) - hlevel = flevel = level-1; + hlevel = level-1; } } break; @@ -943,9 +943,6 @@ void TReport_mask::select_section() TReport_drawer& rdh = (TReport_drawer&)field(F_REPORTH); rdh.set_report_section(_report.section(htype, hlevel)); - TReport_drawer& rdf = (TReport_drawer&)field(F_REPORTF); - rdf.set_report_section(_report.section(ftype, flevel)); - update_report(); } @@ -959,9 +956,6 @@ void TReport_mask::update_report() const TReport_drawer& rd = (TReport_drawer&)field(F_REPORT); rd.win().force_update(); - - TReport_drawer& rdf = (TReport_drawer&)field(F_REPORTF); - rdf.win().force_update(); } void TReport_mask::add_field() @@ -1137,7 +1131,7 @@ void TReport_mask::report_properties() void TReport_mask::notify_focus_field(short id) { TAutomask::notify_focus_field(id); - if (id == F_REPORTH || id == F_REPORTF) + if (id == F_REPORTH || id == F_REPORT) { TReport_drawer& rd = (TReport_drawer&)field(id); _curr_section = &rd.curr_section(); @@ -1282,8 +1276,8 @@ TReport_mask::TReport_mask() : _tree(_report), _is_dirty(false) TTree_field& albero = tfield(F_SECTIONS); RCT rct_sec; albero.get_rect(rct_sec); - const short sec[3] = { F_REPORT, F_REPORTH, F_REPORTF }; - for (int s = 0; s < 3; s++) + const short sec[2] = { F_REPORT, F_REPORTH }; + for (int s = 0; s < 2; s++) { TReport_drawer& rd = (TReport_drawer&)field(sec[s]); RCT rct_rep; rd.get_rect(rct_rep); @@ -1295,7 +1289,6 @@ TReport_mask::TReport_mask() : _tree(_report), _is_dirty(false) switch (s) { case 1 : rd.set_report_section(_report.section('H', 0)); break; - case 2 : rd.set_report_section(_report.section('F', 0)); break; default: _curr_section = &_report.section('B', 1); rd.set_report_section(*_curr_section); diff --git a/ba/ba8300.h b/ba/ba8300.h index eafa12a83..621eb326f 100755 --- a/ba/ba8300.h +++ b/ba/ba8300.h @@ -6,8 +6,6 @@ #define F_REPORTH 105 #define F_REPORT_TITLE 106 #define F_REPORT 107 -#define F_REPORTF_TITLE 108 -#define F_REPORTF 109 #define F_FLD_ADD 110 #define F_FLD_PROPERTIES 111 #define F_SEC_ADD 112 diff --git a/ba/ba8300a.uml b/ba/ba8300a.uml index 66e9f954c..72537e16d 100755 --- a/ba/ba8300a.uml +++ b/ba/ba8300a.uml @@ -66,29 +66,19 @@ BEGIN PROMPT 41 1 "Testata di livello 0" END -REPORT F_REPORTH -3 3 +REPORT F_REPORTH -3 4 BEGIN PROMPT 21 2 "" END TEXT F_REPORT_TITLE BEGIN - PROMPT 41 5 "Corpo di livello 0" + PROMPT 41 6 "Corpo di livello 0" END -REPORT F_REPORT -3 9 +REPORT F_REPORT -3 -3 BEGIN - PROMPT 21 6 "" -END - -TEXT F_REPORTF_TITLE -BEGIN - PROMPT 41 -7 "Coda di livello 0" -END - -REPORT F_REPORTF -3 -3 -BEGIN - PROMPT 21 -6 "" + PROMPT 21 7 "" END