Patch level :

Files correlati     :
Ricompilazione Demo : [ ]
Commento            : Statistiche: corretto commento sulla maschera + corretto selezione da sez/sot a sez/sot


git-svn-id: svn://10.65.10.50/trunk@7705 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
cris 1999-01-26 14:20:36 +00:00
parent d2acdb0845
commit 58a2e79ca3
2 changed files with 40 additions and 45 deletions

View File

@ -249,7 +249,7 @@ void TStatSogxCom::crea_intestazione()
row.put(sep); row.put(sep);
printer().setheaderline(5, row); printer().setheaderline(5, row);
sep = ""; sep = "";
sep.fill('-'); sep.fill('-',80);
row.reset(); row.reset();
row.put(sep); row.put(sep);
printer().setheaderline(6, row); printer().setheaderline(6, row);
@ -385,7 +385,7 @@ void TStatSogxCom::stampa_sezione(TString16 codsez, TString16 codsot)
// stampa totali per sezione // stampa totali per sezione
rigastampa = ""; rigastampa = "";
rigastampa.fill('-'); rigastampa.fill('-',80);
row.reset(); row.reset();
row.put(rigastampa); row.put(rigastampa);
printer().print(row); printer().print(row);
@ -448,7 +448,7 @@ void TStatSogxCom::stampa_totali()
// stampa totali per sezione // stampa totali per sezione
rigastampa = ""; rigastampa = "";
rigastampa.fill('-'); rigastampa.fill('-',80);
row.reset(); row.reset();
row.put(rigastampa); row.put(rigastampa);
printer().print(row); printer().print(row);
@ -478,49 +478,44 @@ bool TStatSogxCom::riepilogo()
stat.setkey(1); stat.setkey(1);
_cur = new TCursor(_rel, "", 1); _cur = new TCursor(_rel, "", 1);
TString256 filtro = ""; TString256 filtro = "";
filtro = format("(13->PROVCOM == \"%s\")",(const char*)_provincia);
// filtro per sezione/sottogruppo // filtro per sezione/sottogruppo
if (_sezini.not_empty()) if (_sezini.not_empty())
{ {
if (filtro.empty())
filtro = format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
else
{
filtro << " && ";
filtro << format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
}
if (_sotini.not_empty()) if (_sotini.not_empty())
{ {
if (filtro.empty()) filtro << "(";
filtro = format("(90->CODSOT >= \"%s\")",(const char*)_sotini); filtro << format("(90->CODSEZ > \"%s\")",(const char*)_sezini);
else filtro << " || ";
{ filtro << "(" << format("(90->CODSEZ == \"%s\")",(const char*)_sezini);
filtro << " && "; filtro << " && ";
filtro << format("(90->CODSOT >= \"%s\")",(const char*)_sotini); filtro << format("(90->CODSOT >= \"%s\")",(const char*)_sotini);
filtro << ")";
filtro << ")";
} }
} else
filtro << format("(90->CODSEZ >= \"%s\")",(const char*)_sezini);
} }
if (_sezfin.not_empty()) if (_sezfin.not_empty())
{ {
if (filtro.empty()) if (filtro.not_empty())
filtro = format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
else
{
filtro << " && "; filtro << " && ";
filtro << format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
}
if (_sotfin.not_empty()) if (_sotfin.not_empty())
{ {
if (filtro.empty()) filtro << "(";
filtro = format("(90->CODSOT <= \"%s\")",(const char*)_sotfin); filtro << format("(90->CODSEZ < \"%s\")",(const char*)_sezfin);
else filtro << " || ";
{ filtro << "(" << format("(90->CODSEZ == \"%s\")",(const char*)_sezfin);
filtro << " && "; filtro << " && ";
filtro << format("(90->CODSOT <= \"%s\")",(const char*)_sotfin); filtro << format("(90->CODSOT <= \"%s\")",(const char*)_sotfin);
filtro << ")";
filtro << ")";
} }
else
filtro << format("(90->CODSEZ <= \"%s\")",(const char*)_sezfin);
} }
} if (filtro.not_empty())
filtro << " && ";
filtro << format("(13->PROVCOM == \"%s\")",(const char*)_provincia);
_cur->setfilter((const char*) filtro, TRUE); _cur->setfilter((const char*) filtro, TRUE);
_categorie.destroy(); _categorie.destroy();
const TString16 catpri = _msk->get(F_CAT1); const TString16 catpri = _msk->get(F_CAT1);

View File

@ -1,6 +1,6 @@
#include "at3900a.h" #include "at3900a.h"
PAGE "Statistica donatori per categoria" -1 -1 78 20 PAGE "Statistica donatori per comune domicilio" -1 -1 78 20
GROUPBOX DLG_NULL 77 4 GROUPBOX DLG_NULL 77 4
BEGIN BEGIN