From 4a565f85ea7a30264a958b8bed4d84e299a0896a Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 9 Apr 2009 11:28:36 +0000 Subject: [PATCH] Patch level : 10.0 280 Files correlati : ce3.exe ce3900.msk ce3900a.rep Ricompilazione Demo : [ ] Commento : 0001262: barre di scorrimento sulla visualizzazione stampe Nella visualizzazione delle stampe non ci sono le barre di scorrimento all'interno della pagina. git-svn-id: svn://10.65.10.50/trunk@18685 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ce/ce3900.cpp | 37 ++++++++++++++++++++++--------------- ce/ce3900.uml | 2 +- ce/ce3900a.rep | 4 ++-- 3 files changed, 25 insertions(+), 18 deletions(-) diff --git a/ce/ce3900.cpp b/ce/ce3900.cpp index 5f239c869..4cbdb370b 100755 --- a/ce/ce3900.cpp +++ b/ce/ce3900.cpp @@ -1,5 +1,6 @@ #include #include +#include #include #include #include @@ -24,12 +25,13 @@ //////////////////////////////////////////////////////// class TStampa_sintetica_mask : public TAutomask { + bool _preview; + protected: bool on_field_event(TOperable_field& o, TField_event e, long jolly); - public: + bool preview() const { return _preview; } TStampa_sintetica_mask(); - virtual ~TStampa_sintetica_mask() {} }; @@ -72,17 +74,25 @@ bool TStampa_sintetica_mask::on_field_event(TOperable_field& o, TField_event e, } } break; + case DLG_PRINT: + if (e == fe_button) + _preview = false; + break; + case DLG_PREVIEW: + if (e == fe_button) + { + _preview = true; + stop_run(K_ENTER); + } + break; default: break; } return ok; } - -TStampa_sintetica_mask::TStampa_sintetica_mask() - :TAutomask("ce3900") +TStampa_sintetica_mask::TStampa_sintetica_mask() : TAutomask("ce3900"), _preview(false) {} - /////////////////////////////////////////////////////////////// // RECORDSET /////////////////////////////////////////////////////////////// @@ -110,16 +120,9 @@ void TStampa_sintetica_recordset::set_filter(const TStampa_sintetica_mask& msk) if (dacat.full() || acat.full()) { if (dacat == acat) - { query << "&&(CODCAT==" << dacat << ")"; - } else - { - if (dacat.full()) - query << "&&(CODCAT>=" << dacat << ")"; - if (acat.full()) - query << "&&(CODCAT<=" << acat << ")"; - } + query << "&&(BETWEEN(CODCAT," << dacat << ',' << acat << "))"; } query << "\nBY CODCAT|CODIMP|CODLOC|IDCESPITE"; //query standard senza raggruppamenti @@ -351,7 +354,11 @@ void TStampa_sintetica::main_loop() rep.set_filter(mask); book.add(rep); - book.print_or_preview(); //stampa il book dei report + //stampa il book dei report + if (mask.preview()) + book.preview(); + else + book.print(); } } diff --git a/ce/ce3900.uml b/ce/ce3900.uml index bd3ec6da2..9b2b86736 100755 --- a/ce/ce3900.uml +++ b/ce/ce3900.uml @@ -1,7 +1,7 @@ #include "ce3900.h" TOOLBAR "topbar" 0 0 0 2 -#include +#include ENDPAGE PAGE "Lista sintetica cespiti" 0 2 0 0 diff --git a/ce/ce3900a.rep b/ce/ce3900a.rep index fab6fba56..7517ae5cd 100755 --- a/ce/ce3900a.rep +++ b/ce/ce3900a.rep @@ -1,5 +1,5 @@ - + Lista sintetica cespiti
@@ -32,7 +32,7 @@ MESSAGE RESET,F1.104 MESSAGE RESET,F1.105 MESSAGE RESET,F1.106 MESSAGE RESET,F1.107 - +