diff --git a/at/at2200.cpp b/at/at2200.cpp index 0e806c760..bf41541ca 100755 --- a/at/at2200.cpp +++ b/at/at2200.cpp @@ -58,7 +58,8 @@ class TStampaPerEta : public TPrintapp TString16 _codsez, _codsot; int _etlarghezza, _etcolonne, _contatore, _totale; bool _stampa80; - + char _sesso; + protected: virtual bool user_create(); @@ -175,13 +176,19 @@ bool TStampaPerEta::filter_func_pereta(const TRelation* rel) { bool filtrato = TRUE; TLocalisamfile& sog = rel->lfile(); - // filtro per categorie - TAssoc_array& categorie = app()._categorie; - if (categorie.items() != 0) + // filtro per sesso + if (app()._sesso != 'I') + filtrato = (sog.get(SOG_SESSO)[0] == app()._sesso); + // filtro per categorie + if (filtrato) { - const TString16 cat = sog.get(SOG_CATDON); - filtrato = categorie.is_key((const char*) cat); - } + TAssoc_array& categorie = app()._categorie; + if (categorie.items() != 0) + { + const TString16 cat = sog.get(SOG_CATDON); + filtrato = categorie.is_key((const char*) cat); + } + } // filtro per data di nascita if (filtrato) { @@ -350,6 +357,7 @@ bool TStampaPerEta::set_print(int m) _categorie.add((const char*) catqui); if (catses.not_empty()) _categorie.add((const char*) catses); + _sesso = _msk->get(F_SESSO)[0]; current_cursor()->set_filterfunction (filter_func_pereta); reset_print(); printer().footerlen(0); diff --git a/at/at2200a.h b/at/at2200a.h index 0bf42d7b9..030c45331 100755 --- a/at/at2200a.h +++ b/at/at2200a.h @@ -25,6 +25,7 @@ #define F_DATAINI 301 #define F_DATAFIN 302 +#define F_SESSO 303 #define F_ELENCO 401 #define F_ETICHETTE 402 diff --git a/at/at2200a.uml b/at/at2200a.uml index 05ba601e4..e0dd3fdf4 100755 --- a/at/at2200a.uml +++ b/at/at2200a.uml @@ -265,9 +265,9 @@ BEGIN FLAGS "D" END -GROUPBOX DLG_NULL 77 3 +GROUPBOX DLG_NULL 77 4 BEGIN - PROMPT 1 10 "Selezione data di nascita" + PROMPT 1 10 "Selezioni per la stampa" END DATE F_DATAINI @@ -282,5 +282,13 @@ BEGIN HELP "Data di nascita finale" END +LISTBOX F_SESSO 12 +BEGIN + PROMPT 2 12 "Sesso " + ITEM "I|Indifferente" + ITEM "1|Maschi" + ITEM "2|Femmine" +END + ENDPAGE ENDMASK