Patch level : 12.0 942

Files correlati     : ca3.exe ca3800.msk ca3800a.rep ca3800as.rep ca3800b.rep ca3800bs.rep ca3800c.rep ca3800cs.rep
Commento            :

Nel bilancio per commessa aggiunti report sintetici (utili per l'esportazione in excel).
This commit is contained in:
Alessandro Bonazzi 2020-02-14 00:30:42 +01:00
parent 0b7912a3d4
commit 97b4511c73
13 changed files with 874 additions and 239 deletions

View File

@ -29,13 +29,17 @@ public:
const TString& TPrint_bilancio_cms_mask::get_report_class() const
{
TString& classe = get_tmp_string();
const int tipostampa = get_int(F_TIPOSTAMPA);
switch (tipostampa)
const int tipostampa = get_int(F_TIPOSTAMPA);
const bool sintetica = get_bool(F_STAMPA_SINTETICA);
switch (tipostampa)
{
case 4: classe = "ca3800b"; break;
case 8: classe = "ca3800c"; break;
default: classe = "ca3800a"; break;
}
if (sintetica)
classe << "s";
return classe;
}
@ -87,6 +91,7 @@ bool TPrint_bilancio_cms_mask::on_field_event(TOperable_field& o, TField_event e
{
const TString8 lib = get_report_class();
TFilename path = o.get();
if (select_custom_file(path, "rep", lib))
{
path = path.name();
@ -109,6 +114,7 @@ bool TPrint_bilancio_cms_mask::on_field_event(TOperable_field& o, TField_event e
{
TEsercizi_contabili esc;
TDate datainiesc, datafinesc;
esc.code2range(anno, datainiesc, datafinesc);
const TDate datafine = get(F_FINE_ES);
if (datafine < datainiesc || datafine > datafinesc)
@ -210,10 +216,10 @@ protected:
virtual bool get_usr_val(const TString& name, TVariant& var) const;
public:
void set_filter(const TPrint_bilancio_cms_mask& msk, const TString& curr_fase);
void set_filter(const TPrint_bilancio_cms_mask& msk, const char * curr_fase = "", const char * curr_cdc = "");
TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth,
const bool show_fasi, const bool show_cdc,
const bool show_cms_descr, const bool show_cms_date);
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date,
const bool sintetica);
};
bool TPrint_bilancio_cms_rep::get_usr_val(const TString& name, TVariant& var) const
@ -227,20 +233,21 @@ bool TPrint_bilancio_cms_rep::set_recordset()
return TReport::set_recordset(rs);
}
void TPrint_bilancio_cms_rep::set_filter(const TPrint_bilancio_cms_mask& msk, const TString& curr_fase_cdc)
void TPrint_bilancio_cms_rep::set_filter(const TPrint_bilancio_cms_mask& msk, const char * curr_fase, const char * curr_cdc)
{
TPrint_bilancio_cms_recordset* recset = new TPrint_bilancio_cms_recordset();
//la set_filter del recordset puo' essere chiamata per fase o per centro di costo; se curr_fase_cdc e' vuota..
//..e' nel caso della stampa principale dettagliata (ca3800a.rep)
recset->set_filter(msk, curr_fase_cdc);
recset->set_filter(msk, curr_fase, curr_cdc);
TReport::set_recordset(recset);
}
TPrint_bilancio_cms_rep::TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix,
const int depth, const bool show_fasi, const bool show_cdc,
const bool show_cms_descr, const bool show_cms_date)
:TCRPA_report(rep_name, prefix, depth, show_fasi, show_cdc, show_cms_descr, show_cms_date)
const bool show_cms_descr, const bool show_cms_date, const bool sintetica)
:TCRPA_report(rep_name, prefix, depth, show_fasi, show_cdc, show_cms_descr, show_cms_date, sintetica)
{
}
@ -252,7 +259,9 @@ class TPrint_bilancio_cms : public TSkeleton_application
TPrint_bilancio_cms_mask* _mask;
protected:
void print_or_preview(const bool stampa);
void build_lista_fasi(TString_array & lista_fasi, const TString & fase);
void build_lista_cdc(TString_array & lista_cdc, const TString & cdc);
void print_or_preview(const bool stampa);
virtual void print();
virtual void preview();
@ -269,6 +278,56 @@ void TPrint_bilancio_cms::preview()
print_or_preview(false);
}
void TPrint_bilancio_cms::build_lista_fasi(TString_array & lista_fasi, const TString & fase)
{
TString query("USE FASI");
TString select = ca_create_user_select_clause(LF_FASI);
if (fase.full())
lista_fasi.add(fase);
else
{
if (select.full())
query << "\nSELECT " << select;
TISAM_recordset file_fasi(query);
for (TRecnotype j = 0; file_fasi.move_to(j); j++)
{
const TString16 curr_fase = file_fasi.get(FASI_CODFASE).as_string();
if (curr_fase.full() && lista_fasi.find(curr_fase) < 0)
lista_fasi.add(curr_fase);
}
lista_fasi.sort();
}
}
void TPrint_bilancio_cms::build_lista_cdc(TString_array & lista_cdc, const TString & cdc)
{
TString query("USE CDC");
TString select = ca_create_user_select_clause(LF_CDC);
if (cdc.full())
lista_cdc.add(cdc);
else
{
if (select.full())
query << "\nSELECT " << select;
TISAM_recordset file_cdc(query);
for (TRecnotype j = 0; file_cdc.move_to(j); j++)
{
const TString16 curr_cdc = file_cdc.get(CDC_CODCOSTO).as_string();
if (curr_cdc.full() && lista_cdc.find(curr_cdc) < 0)
lista_cdc.add(curr_cdc);
}
lista_cdc.sort();
}
}
void TPrint_bilancio_cms::print_or_preview(const bool stampa)
{
//report e book dei report
@ -283,108 +342,125 @@ void TPrint_bilancio_cms::print_or_preview(const bool stampa)
const int tipostampa = _mask->get_int(F_TIPOSTAMPA);
//fasi
const bool use_fasi = (tipostampa == 1) || (tipostampa == 3);
const bool dett_fasi = (tipostampa == 1) || (tipostampa == 3);
const TString& fase = _mask->get(F_FASE);
const bool group_fasi = tipostampa == 4;
const bool show_fasi = use_fasi && fase.empty();
const bool show_fasi = dett_fasi && fase.empty();
const bool sintetica = _mask->get_bool(F_STAMPA_SINTETICA);
//cdc
const bool use_cdc = (tipostampa == 2) || (tipostampa == 3);
const bool dett_cdc = (tipostampa == 2) || (tipostampa == 3);
const TString& cdc = _mask->get(F_CDC);
const bool group_cdc = tipostampa == 8;
const bool show_cdc = use_cdc && cdc.empty();
const bool show_cdc = dett_cdc && cdc.empty();
//descrizioni
const bool show_cms_descr = _mask->get_bool(F_SHOW_CMS_DESCR);
const bool show_cms_date = _mask->get_bool(F_SHOW_CMS_DATE);
if (path.empty())
{
path = _mask->get_report_class();
}
//crea il report in base ai parametri (tipo report,struttura,profondita' di stampa)
TPrint_bilancio_cms_rep rep(path, prefix, depth, show_fasi, show_cdc, show_cms_descr, show_cms_date);
TPrint_bilancio_cms_rep rep(path, prefix, depth, show_fasi, show_cdc, show_cms_descr, show_cms_date, sintetica);
//se e' una stampa di tipo fasi riassunte (crpa special edition) deve fare lo scanning di tutte le fasi..
//..singolarmente e stampare un report per ogni fase.Senno' stampa un solo report
if (group_fasi)
{
//stampa tutte le fasi distinte in modo riassuntivo (crpa dedicate)
TString_array lista_fasi;
//crea un TString_array con tutte le fasi distinte non ripetute
TString query;
query = "USE FASI";
const TString& select = ca_create_user_select_clause(LF_FASI);
if (select.full())
query << "\nSELECT " << select;
if (dett_fasi && dett_cdc)
{
TString_array lista_fasi;
TString_array lista_cdc;
TISAM_recordset file_fasi(query);
if (fase.blank() && cdc.blank())
{
rep.set_filter(*_mask);
book.add(rep);
if (stampa)
book.print();
else
book.preview();
}
else
{
build_lista_fasi(lista_fasi, fase);
build_lista_cdc(lista_cdc, cdc); //se la stampa e' con tutte le fasi distinte riassunte (crpa dedicate) fa un rep per fase...
if (!lista_fasi.empty() && !lista_cdc.empty())
{
//per ogni fase crea un report e lo aggiunge al book
FOR_EACH_ARRAY_ROW(lista_fasi, i, row_fasi)
{
TString16 fase = lista_fasi.row(i);
for (TRecnotype j = 0; file_fasi.move_to(j); j++)
{
const TString16 curr_fase = file_fasi.get(FASI_CODFASE).as_string();
FOR_EACH_ARRAY_ROW(lista_cdc, j, row_cdc)
{
const TString& cdc = lista_cdc.row(j);
if (!curr_fase.empty() && lista_fasi.find(curr_fase) < 0)
lista_fasi.add(curr_fase);
}
lista_fasi.sort(); //ordina alfabeticamente l'arrayone
const long fasi_distinte = lista_fasi.items(); //numero di controllo
rep.set_filter(*_mask, fase, cdc);
book.add(rep);
}
}
if (stampa)
book.print();
else
book.preview();
}
}
} //if(group_fasi...
else
if (group_fasi || dett_fasi)
{
TString_array lista_fasi;
//se la stampa e' con tutte le fasi distinte riassunte (crpa dedicate) fa un rep per fase...
if (!lista_fasi.empty())
{
//per ogni fase crea un report e lo aggiunge al book
FOR_EACH_ARRAY_ROW(lista_fasi, i, row)
{
TString16 fase = lista_fasi.row(i);
rep.set_filter(*_mask, fase);
book.add(rep);
}
if (stampa)
book.print();
else
book.preview();
}
build_lista_fasi(lista_fasi, fase);
//se la stampa e' con tutte le fasi distinte riassunte (crpa dedicate) fa un rep per fase...
if (!lista_fasi.empty())
{
//per ogni fase crea un report e lo aggiunge al book
FOR_EACH_ARRAY_ROW(lista_fasi, i, row)
{
TString16 fase = lista_fasi.row(i);
rep.set_filter(*_mask, fase);
book.add(rep);
}
if (stampa)
book.print();
else
book.preview();
}
} //if(group_fasi...
else if (group_cdc)
{
//stampa tutte le fasi distinte in modo riassuntivo (crpa dedicate)
TString_array lista_cdc;
//crea un TString_array con tutte le fasi distinte non ripetute
TString query;
query = "USE CDC";
//filtra per utente se l'utente ha limitazioni sui CDC
const TString& select = ca_create_user_select_clause(LF_CDC);
if (select.full())
query << "\nSELECT " << select;
} //if(group_fasi...
else
if (group_cdc || dett_cdc)
{
TString_array lista_cdc;
TISAM_recordset file_cdc(query);
build_lista_cdc(lista_cdc, cdc);
if (!lista_cdc.empty())
{
FOR_EACH_ARRAY_ROW(lista_cdc, j, row_cdc)
{
const TString& cdc = lista_cdc.row(j);
for (TRecnotype j = 0; file_cdc.move_to(j); j++)
{
const TString& curr_cdc = file_cdc.get(CDC_CODCOSTO).as_string();
rep.set_filter(*_mask, curr_cdc);
book.add(rep);
}
if (stampa)
book.print();
else
book.preview();
} //if(group_cdc...
else //...senno' stampa standard in un giro solo
{
rep.set_filter(*_mask, "");
book.add(rep);
if (stampa)
book.print();
else
book.preview();
}
rep.set_filter(*_mask, fase, cdc);
book.add(rep);
}
}
if (stampa)
book.print();
else
book.preview();
} //if(group_cdc...
else //...senno' stampa standard in un giro solo
{
rep.set_filter(*_mask);
book.add(rep);
if (stampa)
book.print();
else
book.preview();
}
}
@ -403,6 +479,13 @@ int ca3800(int argc, char* argv[])
return 0;
}
// LEVEL
// _ 0 terminano nell'anno selezionato / iniziate nel passato CTAP
// _ 1 terminano nell'anno selezionato / iniziate nell'anno selezionato CTAC
// _ 2 terminano nel futuro / iniziate nel passato CCAP
// _ 3 terminano nel futuro / iniziate nell'anno selezionato CCAC
// _ 4 di appoggio / terminano nell'anno selezionato / iniziate nell'anno selezionato CTGG
//Istruzioni per i programmi ca3800 e ca3900
//------------------------------------------
// CA_3800

View File

@ -85,6 +85,11 @@ BEGIN
MESSAGE CLEAR,F_FASE|CLEAR,F_CDC
END
BOOLEAN F_STAMPA_SINTETICA
BEGIN
PROMPT 53 8 "Stampa Sintetica"
END
STRING F_FASE 10
BEGIN
PROMPT 2 9 "Fase "

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="ve1300" name="ca3800a" orientation="2" lpi="6">
<report libraries="ve1300" name="ca3800a" orientation="2" lpi="6" class="ca3800a">
<description>Bilancio commessa CA</description>
<font face="Arial Narrow" size="7" />
<section type="Head" pattern="1">

214
src/ca/ca3800as.rep Normal file
View File

@ -0,0 +1,214 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="ve1300" name="ca3800as" orientation="2" lpi="6" class="ca3800as">
<description>Bilancio commessa CA</description>
<font face="Arial Narrow" size="7" />
<section type="Head" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="7" />
<field x="163" type="Testo" width="4" pattern="1" text="Pag.">
<font italic="1" face="Arial Narrow" size="7" />
</field>
<field x="167" type="Numero" align="right" width="3" pattern="1">
<source>#REPORT.PAGE</source>
</field>
<field x="45" y="1" type="Testo" align="center" width="6" id="3" pattern="1" text="Inizio" />
<field x="50.5" y="1" type="Testo" align="center" width="6" id="4" pattern="1" text="Fine" />
<field x="55" y="1" type="Testo" align="center" width="6" id="5" pattern="1" text="Fase" />
<field x="62.5" y="1" type="Testo" align="center" width="6" id="6" pattern="1" text="CdC" />
<field x="68" y="1" type="Array" align="center" width="7" id="7" pattern="1">
<source>TIPOSTIMA</source>
<list>
<li Value="% Av." Code="T" />
<li Value="% Ric." Code="C" />
<li Value="% Ric." Code="R" />
</list>
</field>
<field x="73" y="1" type="Testo" align="right" width="13" id="69" pattern="1" text="Testata" />
<field x="1" y="1" type="Testo" width="4" id="121" pattern="1" text="Cod." />
<field x="5" y="1" type="Testo" width="15" id="121" pattern="1" text="Commessa" />
<field x="87" type="Stringa" valign="bottom" align="right" width="13" height="2" id="169" pattern="1">
<source>"MARGINE CONTRIBUZIONE"</source>
</field>
</section>
<section type="Head" level="1" height="5" pattern="1">
<field x="1" type="Testo" align="center" width="169" pattern="1" text="BILANCIO DI COMMESSA PER ESERCIZIO">
<font face="Courier New" size="12" />
</field>
<field x="2" y="1" type="Testo" width="37" pattern="1" text="Costi e ricavi di Commessa maturati nell'esercizio">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="40" y="1" type="Stringa" width="5" pattern="1">
<font face="Arial" bold="1" size="9" />
<source>ANNO</source>
</field>
<field x="46.5" y="1" type="Testo" width="3" pattern="1" text="Dal">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="50" y="1" type="Data" width="10" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>DAL</source>
</field>
<field x="68.5" y="1" type="Testo" width="15" pattern="1" text="Stima avanzamento ">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="85" y="1" type="Array" width="45" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>TIPOSTIMA</source>
<list>
<li Value="COSTI Preventivi \ RICAVI Preventivi (TEMPO)" Code="T" />
<li Value="COSTI Consuntivi \ RICAVI Preventivi" Code="C" />
<li Value="COSTI Consuntivi \ RICAVI Consuntivi" Code="R" />
</list>
</field>
<field x="140.5" y="1" type="Testo" width="20" pattern="1" text="Detrazioni calcolate come">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="160" y="1" type="Array" width="10" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>DETRCONS</source>
<list>
<li Value="Preventivi" Code=" " />
<li Value="Consuntivi" Code="X" />
</list>
</field>
<field x="2" y="2" type="Testo" width="20" pattern="1" text="Include esercizi successivi">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="22.5" y="2" type="Stringa" width="3" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>VITAINTERA</source>
</field>
<field x="27" y="2" type="Testo" width="12" pattern="1" text="Include inevasi">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="39" y="2" type="Stringa" width="3" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>INCLUDE_DOCUMENTI</source>
</field>
<field x="46.5" y="2" type="Testo" width="3" pattern="1" text="Al">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="50" y="2" type="Data" width="10" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>AL</source>
<alt_source>DATAFINE</alt_source>
</field>
<field x="136.5" y="2" type="Testo" width="25" pattern="1" text="Profondita' della struttura in esame">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="163" y="2" type="Array" width="7" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>DEPTH</source>
<list>
<li Value="Gruppo" Code="1" />
<li Value="Conto" Code="2" />
</list>
</field>
<field x="2" y="3" type="Testo" width="10" pattern="1" text="Legenda : ">
<font face="Arial Narrow" size="8" />
</field>
<field x="11" y="3" type="Testo" width="65" pattern="1" text="CTAP - Commesse Terminate nell'esercizio e avviate in esercizi precedenti">
<font face="Arial Narrow" size="8" />
</field>
<field x="75.5" y="3" type="Testo" width="67" pattern="1" text="CCAP - Commesse che terminano oltre l'esercizio corrente e avviate in esecizi precedenti">
<font face="Arial Narrow" size="8" />
</field>
<field x="143" y="3" type="Testo" width="35" pattern="1" text="CTGG - Commesse di servizio">
<font face="Arial Narrow" size="8" />
</field>
<field x="11" y="4" type="Testo" width="65" pattern="1" text="CTAC - Commesse Terminano oltre l'esercizio corrente e avviate in esecizi precedenti">
<font face="Arial Narrow" size="8" />
</field>
<field x="75.5" y="4" type="Testo" width="68" pattern="1" text="CCAC - Commesse che terminano oltre l'esercizio corrente e avviate nell'esercizio corrente">
<font face="Arial Narrow" size="8" />
</field>
</section>
<section type="Body" pattern="1" />
<section type="Body" level="1" pattern="1">
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di fase
+!</prescript>
<field x="5" type="Stringa" width="17" id="1" pattern="1">
<source>CODCMS</source>
</field>
<field x="22" type="Stringa" width="25" id="2" pattern="1">
<source>DESCRIZ</source>
</field>
<field x="47" type="Data" align="center" width="6" id="3" pattern="1">
<source>DATAINI</source>
</field>
<field x="53" type="Data" align="center" width="6" id="4" pattern="1">
<source>DATAFINE</source>
</field>
<field x="59" type="Stringa" width="9" id="5" pattern="1">
<source>FASE</source>
<prescript>#STAMPAFASI @
EMPTY= IF
#THIS HIDE
ELSE
#THIS SHOW
THEN
</prescript>
</field>
<field x="68" type="Stringa" width="5" id="6" pattern="1">
<source>CDC</source>
<prescript description="B1.6 PRESCRIPT">#STAMPACDC @
EMPTY= IF
#THIS HIDE
ELSE
#THIS SHOW
THEN
</prescript>
</field>
<field x="73" type="Numero" align="right" width="3.5" id="7" pattern="1">
<font italic="1" face="Arial Narrow" size="7" />
<source>ROUND(AVANZAMENTO;0)</source>
</field>
<field x="1" type="Array" width="4" id="10" pattern="1">
<source>LEVEL</source>
<list>
<li Value="CTAP" Code="0" />
<li Value="CTAC" Code="1" />
<li Value="CCAP" Code="2" />
<li Value="CCAC" Code="3" />
<li Value="CTGG" Code="4" />
</list>
</field>
<field x="76.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
<field x="89.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
<source>#RICAVI-#COSTI</source>
</field>
<field x="103" type="Numero" align="right" width="4" id="170" pattern="1" text="####">
<font italic="1" face="Arial Narrow" size="7" />
<prescript>#RICAVI @
EMPTY= IF
0
ELSE
1
#COSTI @
#RICAVI @
&#2F;
-
100
*
0
ROUND
DUP
-999 &#3C; IF
DROP -999
THEN
THEN
#THIS !</prescript>
</field>
<field x="106.5" type="Testo" align="center" width="2" id="171" pattern="1" text="%" />
<field type="Numero" hidden="1" align="right" width="1" id="200" pattern="1">
<prescript description="B1.200 PRESCRIPT">#THIS @
1
+
#THIS !</prescript>
</field>
</section>
<section type="Foot" pattern="1" />
<section type="Foot" level="1" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="7" />
</section>
<sql>USE SALDANA</sql>
</report>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="ve1300" name="ca3800b" orientation="2" lpi="6">
<report libraries="ve1300" name="ca3800b" orientation="2" lpi="6" class="ca3800b">
<description>Bilancio commessa CA riassuntivo per fasi</description>
<font face="Arial Narrow" size="8" />
<section type="Head" pattern="1">
@ -296,4 +296,4 @@ MESSAGE RESET,169
</field>
</section>
<sql>USE SALDANA</sql>
</report>
</report>

178
src/ca/ca3800bs.rep Normal file
View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="ve1300" page_merge="" save_printer="" name="ca3800bs" use_printer_font="" orientation="2" page_split="" lpi="6" command="" class="ca3800bs">
<description>Bilancio commessa CA riassuntivo per fasi</description>
<font face="Arial Narrow" size="8" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
<field x="17" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial" bold="1" size="10" />
<source>FASESPEC</source>
</field>
<field x="163" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag.">
<font italic="1" face="Arial Narrow" size="8" />
</field>
<field x="167" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<source>#REPORT.PAGE</source>
</field>
<field x="39" deactivated="" type="Testo" valign="bottom" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" height="2" id="69" pattern="1" hide_zero="" text="Testata" />
<field x="6" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="121" pattern="1" hide_zero="" text="Fase" />
<field x="1" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="121" pattern="1" hide_zero="" text="Cod." />
<field x="6" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="8" codval="" id="121" pattern="1" hide_zero="" text="Commessa" />
<field x="54" deactivated="" type="Stringa" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="13" codval="" height="2" id="169" pattern="1" hide_zero="" text="">
<source>"MARGINE CONTRIBUZIONE"</source>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1">
<field deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="169" codval="" id="" pattern="1" hide_zero="" text="BILANCIO DI COMMESSA PER ESERCIZIO RAGGRUPPATO PER FASE">
<font face="Courier New" size="12" />
</field>
<field x="1" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="37" codval="" id="" pattern="1" hide_zero="" text="Costi e ricavi di Commessa maturati nell'esercizio">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="39" y="1" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial" bold="1" size="9" />
<source>ANNO</source>
</field>
<field x="45.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Dal">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="49" y="1" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>DAL</source>
</field>
<field x="67.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="Stima avanzamento ">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="84" y="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="45" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>TIPOSTIMA</source>
<list>
<li Value="COSTI Preventivi \ RICAVI Preventivi (TEMPO)" Code="T" />
<li Value="COSTI Consuntivi \ RICAVI Preventivi" Code="C" />
<li Value="COSTI Consuntivi \ RICAVI Consuntivi" Code="R" />
</list>
</field>
<field x="140.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="Detrazioni calcolate come">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="160" y="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>DETRCONS</source>
<list>
<li Value="Preventivi" Code=" " />
<li Value="Consuntivi" Code="X" />
</list>
</field>
<field x="1" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="Include esercizi successivi">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="21.5" y="2" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>VITAINTERA</source>
</field>
<field x="26" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="Include inevasi">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="38" y="2" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>INCLUDE_DOCUMENTI</source>
</field>
<field x="45.5" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Al">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="49" y="2" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>AL</source>
<alt_source>DATAFINE</alt_source>
</field>
<field x="67.5" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="Fase">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="136.5" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="Profondita' della struttura in esame">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="163" y="2" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="7" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>DEPTH</source>
<list>
<li Value="Gruppo" Code="1" />
<li Value="Conto" Code="2" />
</list>
</field>
<field x="1" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Legenda : " />
<field x="10" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="65" codval="" id="" pattern="1" hide_zero="" text="CTAP - Commesse Terminate nell'esercizio e avviate in esercizi precedenti" />
<field x="74.5" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="67" codval="" id="" pattern="1" hide_zero="" text="CCAP - Commesse che terminano oltre l'esercizio corrente e avviate in esecizi precedenti" />
<field x="142" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="CTGG - Commesse di servizio" />
<field x="10" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="65" codval="" id="" pattern="1" hide_zero="" text="CTAC - Commesse Terminano oltre l'esercizio corrente e avviate in esecizi precedenti" />
<field x="74.5" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="68" codval="" id="" pattern="1" hide_zero="" text="CCAC - Commesse che terminano oltre l'esercizio corrente e avviate nell'esercizio corrente" />
<field x="82.5" y="2" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="1" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>FASESPEC</source>
<postscript description="">MESSAGE COPY,F1.2</postscript>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di fase
+!</prescript>
<field x="69.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="2" codval="" id="" pattern="1" hide_zero="" text="%" />
<field x="6" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="1" pattern="1" hide_zero="" text="">
<source>CODCMS</source>
</field>
<field x="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="10" pattern="1" hide_zero="" text="">
<source>LEVEL</source>
<list>
<li Value="CTAP" Code="0" />
<li Value="CTAC" Code="1" />
<li Value="CCAP" Code="2" />
<li Value="CCAC" Code="3" />
<li Value="CTGG" Code="4" />
</list>
</field>
<field x="39" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="69" pattern="1" hide_zero="" text="###.###.###,@@">
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F3.69</postscript>
</field>
<field x="52.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="169" pattern="1" hide_zero="" text="###.###.###,@@">
<source>#RICAVI-#COSTI</source>
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F3.169</postscript>
</field>
<field x="65.5" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="4" codval="" id="170" pattern="1" hide_zero="" text="####">
<font italic="1" face="Arial Narrow" size="8" />
<prescript description="B1.170 PRESCRIPT">#RICAVI @
EMPTY= IF
0
ELSE
1
#COSTI @
#RICAVI @
&#2F;
-
100
*
0
ROUND
DUP
-999 &#3C; IF
DROP -999
THEN
THEN
#THIS !
</prescript>
</field>
<field x="69.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="2" codval="" id="171" pattern="1" hide_zero="" text="%" />
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1">
<field border="1" x="1" y="0.25" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="169" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
<field x="2" y="0.75" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="Bilancio di commessa per esercizio">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
</field>
<field x="28.5" y="0.75" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>H1.2</source>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
</section>
<sql>USE SALDANA</sql>
</report>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="ve1300" name="ca3800c" orientation="2" lpi="6">
<report libraries="ve1300" name="ca3800c" orientation="2" lpi="6" class="ca3800c">
<description>Bilancio commessa CA riassuntivo per CdC</description>
<font face="Arial Narrow" size="8" />
<section type="Head" pattern="1">

178
src/ca/ca3800cs.rep Normal file
View File

@ -0,0 +1,178 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="ve1300" page_merge="" save_printer="" name="ca3800cs" use_printer_font="" orientation="2" page_split="" lpi="6" command="" class="ca3800cs">
<description>Bilancio commessa CA riassuntivo per CdC</description>
<font face="Arial Narrow" size="8" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
<field x="22.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial" bold="1" size="10" />
<source>CDCSPEC</source>
</field>
<field x="164" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Pag.">
<font italic="1" face="Arial Narrow" size="8" />
</field>
<field x="167" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<source>#REPORT.PAGE</source>
</field>
<field x="39" deactivated="" type="Testo" valign="bottom" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" height="2" id="69" pattern="1" hide_zero="" text="Testata" />
<field x="6" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="14" codval="" id="121" pattern="1" hide_zero="" text="Centro di costo" />
<field x="1" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="121" pattern="1" hide_zero="" text="Cod." />
<field x="6" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="14" codval="" id="121" pattern="1" hide_zero="" text="Commessa" />
<field x="55" deactivated="" type="Stringa" valign="bottom" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" height="2" id="169" pattern="1" hide_zero="" text="">
<source>"MARGINE CONTRIBUZIONE"</source>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1">
<field deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="169" codval="" id="" pattern="1" hide_zero="" text="BILANCIO DI COMMESSA PER ESERCIZIO RAGGRUPPATO PER CENTRI DI COSTO">
<font face="Courier New" size="12" />
</field>
<field x="1" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="37" codval="" id="" pattern="1" hide_zero="" text="Costi e ricavi di Commessa maturati nell'esercizio">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="39" y="1" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial" bold="1" size="9" />
<source>ANNO</source>
</field>
<field x="45.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Dal">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="49" y="1" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>DAL</source>
</field>
<field x="67.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="Stima avanzamento ">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="84" y="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="45" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>TIPOSTIMA</source>
<list>
<li Value="COSTI Preventivi \ RICAVI Preventivi (TEMPO)" Code="T" />
<li Value="COSTI Consuntivi \ RICAVI Preventivi" Code="C" />
<li Value="COSTI Consuntivi \ RICAVI Consuntivi" Code="R" />
</list>
</field>
<field x="140.5" y="1" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="Detrazioni calcolate come">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="160" y="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>DETRCONS</source>
<list>
<li Value="Preventivi" Code=" " />
<li Value="Consuntivi" Code="X" />
</list>
</field>
<field x="1" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="" pattern="1" hide_zero="" text="Include esercizi successivi">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="21.5" y="2" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>VITAINTERA</source>
</field>
<field x="26" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="12" codval="" id="" pattern="1" hide_zero="" text="Include inevasi">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="38" y="2" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>INCLUDE_DOCUMENTI</source>
</field>
<field x="45.5" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Al">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="49" y="2" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>AL</source>
<alt_source>DATAFINE</alt_source>
</field>
<field x="67.5" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="15" codval="" id="" pattern="1" hide_zero="" text="Centro di Costo">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="136.5" y="2" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="Profondita' della struttura in esame">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="163" y="2" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="7" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>DEPTH</source>
<list>
<li Value="Gruppo" Code="1" />
<li Value="Conto" Code="2" />
</list>
</field>
<field x="1" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="Legenda : " />
<field x="10" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="65" codval="" id="" pattern="1" hide_zero="" text="CTAP - Commesse Terminate nell'esercizio e avviate in esercizi precedenti" />
<field x="74.5" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="67" codval="" id="" pattern="1" hide_zero="" text="CCAP - Commesse che terminano oltre l'esercizio corrente e avviate in esecizi precedenti" />
<field x="142" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="CTGG - Commesse di servizio" />
<field x="10" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="65" codval="" id="" pattern="1" hide_zero="" text="CTAC - Commesse Terminano oltre l'esercizio corrente e avviate in esecizi precedenti" />
<field x="74.5" y="4" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="68" codval="" id="" pattern="1" hide_zero="" text="CCAC - Commesse che terminano oltre l'esercizio corrente e avviate nell'esercizio corrente" />
<field x="87.5" y="2" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="1" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>CDCSPEC</source>
<postscript description="H1.1 POSTSCRIPT">MESSAGE COPY,F1.2</postscript>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di cdc
+!</prescript>
<field x="69.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="2" codval="" id="" pattern="1" hide_zero="" text="%" />
<field x="6" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="20" codval="" id="1" pattern="1" hide_zero="" text="">
<source>CODCMS</source>
</field>
<field x="1" deactivated="" type="Array" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="10" pattern="1" hide_zero="" text="">
<source>LEVEL</source>
<list>
<li Value="CTAP" Code="0" />
<li Value="CTAC" Code="1" />
<li Value="CCAP" Code="2" />
<li Value="CCAC" Code="3" />
<li Value="CTGG" Code="4" />
</list>
</field>
<field x="39" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="69" pattern="1" hide_zero="" text="###.###.###,@@">
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F3.69</postscript>
</field>
<field x="52.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="13" codval="" id="169" pattern="1" hide_zero="" text="###.###.###,@@">
<source>#RICAVI-#COSTI</source>
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F3.169</postscript>
</field>
<field x="65.5" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="4" codval="" id="170" pattern="1" hide_zero="" text="####">
<font italic="1" face="Arial Narrow" size="8" />
<prescript description="B1.170 PRESCRIPT">#RICAVI @
EMPTY= IF
0
ELSE
1
#COSTI @
#RICAVI @
&#2F;
-
100
*
0
ROUND
DUP
-999 &#3C; IF
DROP -999
THEN
THEN
#THIS !
</prescript>
</field>
<field x="69.5" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="2" codval="" id="171" pattern="1" hide_zero="" text="%" />
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1">
<field border="1" x="1" y="0.25" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="169" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
<field x="2" y="0.75" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="25" codval="" id="" pattern="1" hide_zero="" text="Bilancio di commessa per esercizio">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
</field>
<field x="28.5" y="0.75" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial Narrow" bold="1" size="9" />
<source>H1.2</source>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="8" />
</section>
<sql>USE SALDANA</sql>
</report>

View File

@ -137,7 +137,7 @@ int TCRPA_report::show_hide_left_column(const bool show_fld, TReport_field* fld,
//metodo per il riempimento e lo spostamento dei campi dinamici
void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr,
const int model_id, const bool show_fasi, const bool show_cdc,
const bool show_cms_descr, const bool show_cms_date)
const bool show_cms_descr, const bool show_cms_date, const bool sintetica)
{
//solo nel caso sia richiesta la sparizione di un campo...
if (!show_fasi || !show_cdc || !show_cms_descr || !show_cms_date)
@ -236,110 +236,86 @@ void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect, const TStr
switch (sect_type)
{
case 'H': //gli header devono stampare l'intestazione
{
new_field->set_picture(str_arr.row(i));
}
break;
new_field->set_picture(str_arr.row(i));
break;
case 'B': //i body devono stampare i valori e sommarli ai totali nei footer
{
new_field->set_field(str_arr.row(i));
if (!sintetica)
{
new_field->set_field(str_arr.row(i));
TString ps = "MESSAGE ADD,F3.";
ps << new_field->id();
if (find_section('F', 4) != NULL)
ps << "|ADD,F4." << new_field->id();
new_field->set_postscript(ps);
if (find_section('F', 4) != NULL)
ps << "|ADD,F4." << new_field->id();
new_field->set_postscript(ps);
}
break;
}
break;
case 'F': //i footer devono calcolarsi i totali; ma i footer di totale fasi (4) non devono..
//..fare assolutamente nulla!
if (rep_sect.level() > 0 && rep_sect.level() < 4)
//..fare assolutamente nulla!
if (!sintetica && rep_sect.level() > 0 && rep_sect.level() < 4)
{
//crea il campo sul report con tanto di id,postscript ecc...
new_field->set_field("");
//crea il campo sul report con tanto di id,postscript ecc...
new_field->set_field("");
switch (rep_sect.level())
{
case 1:
{
//caso particolare del footer di report con i totali alla Adolf!
//Dalla matematica secondo Adolf:
//(a) TotGen = TotCmsNor + TotCmsSupp
//(b) DiffGen = TotCmsSupp - TotCmsNor
//->(c) DiffGen = TotGen - 2*TotCmsNor
switch (rep_sect.level())
{
case 2:
{
//ogni campo di footer F2 deve sommarsi a quello piu' esterno F1
TString ps = "MESSAGE ADD,F";
ps << (rep_sect.level() - 1) << '.' << new_field->id();
//i campi del totale generale si sommano ai campi delle differenze di Adolf
/**CAZZONE** tentata per utilizzare la (c) ma non funziona:questi non servono a una ceppa di minchia
new_field->set_field("");
TString ps = "MESSAGE ADD,F";
ps << (rep_sect.level()) << '.' << (new_field->id() + 200);
new_field->set_prescript(ps);*/
//in caso di Commesse Supporto (LEVEL=4) il totale si deve sommare nelle differenze generali
ps << "\n#101 @\n";
ps << "4 = IF\n";
ps << " MESSAGE ADD,F1." << (new_field->id() + 200) << "\n";
ps << "THEN";
//sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 1 (F1)
//e' il campo che va nella riga delle Differenze
/*TReport_field* sub_new_field = (TReport_field*)new_field->dup();
rep_sect.add(sub_new_field);
sub_new_field->offset(TPoint(0, 250));
sub_new_field->set_id(new_field->id() + 200);
sub_new_field->set_groups("90");
sub_new_field->set_prescript("");*/
}
break;
//setta il postscript al new_field
new_field->set_postscript(ps);
case 2:
{
//ogni campo di footer F2 deve sommarsi a quello piu' esterno F1
TString ps = "MESSAGE ADD,F";
ps << (rep_sect.level() - 1) << '.' << new_field->id();
//SUB_new_field, ovvero gestione dei campi adolfici dei totali e delle differenze
//Gestione totali delle commesse normali (Adolf!)
//Alla fine di tutte le 4 sezioni di commesse normali ci va il totale delle medesime; questo..
//..totale va stampato prima della sezione con le commesse di appoggio
//in caso di Commesse Supporto (LEVEL=4) il totale si deve sommare nelle differenze generali
ps << "\n#101 @\n";
ps << "4 = IF\n";
ps << " MESSAGE ADD,F1." << (new_field->id() + 200) << "\n";
ps << "THEN";
//sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 2 (F2)
//e' il campo con il totale delle commesse normali
TReport_field* sub_new_field = (TReport_field*)new_field->dup();
rep_sect.add(sub_new_field);
sub_new_field->offset(TReport_size(0, 250));
sub_new_field->set_id(new_field->id() + 200);
sub_new_field->set_groups("90");
sub_new_field->set_postscript("");
//setta il postscript al new_field
new_field->set_postscript(ps);
//SUB_new_field, ovvero gestione dei campi adolfici dei totali e delle differenze
//Gestione totali delle commesse normali (Adolf!)
//Alla fine di tutte le 4 sezioni di commesse normali ci va il totale delle medesime; questo..
//..totale va stampato prima della sezione con le commesse di appoggio
//sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 2 (F2)
//e' il campo con il totale delle commesse normali
TReport_field* sub_new_field = (TReport_field*)new_field->dup();
rep_sect.add(sub_new_field);
sub_new_field->offset(TReport_size(0, 250));
sub_new_field->set_id(new_field->id() + 200);
sub_new_field->set_groups("90");
sub_new_field->set_postscript("");
//il totale delle commesse normali si sottrae nelle differenze generali
TString ps_diff;
//ps_diff << "#THIS @\n2\n*\n!\n"; **CAZZONE** tentata per applicare la (c);non funzia
ps_diff << "MESSAGE SUB,F1." << sub_new_field->id();
sub_new_field->set_postscript(ps_diff);
}
break;
case 3:
{
//ogni campo di footer F3 deve sommarsi a quello piu' esterno F2
TString ps = "MESSAGE ADD,F";
ps << (rep_sect.level() - 1) << '.' << new_field->id();
//deve anche sommarsi al totale delle Commesse Normali (che viene stampato al passaggio tra..
//..LEVEL=3 e LEVEL=4)
ps << "\nMESSAGE ADD,F2." << (new_field->id() + 200);
//setta il postscript al new_field
new_field->set_postscript(ps);
}
break;
default:
break;
} //switch(rep_sect.level())
}
//il totale delle commesse normali si sottrae nelle differenze generali
TString ps_diff;
//ps_diff << "#THIS @\n2\n*\n!\n"; **CAZZONE** tentata per applicare la (c);non funzia
ps_diff << "MESSAGE SUB,F1." << sub_new_field->id();
sub_new_field->set_postscript(ps_diff);
}
break;
case 3:
if (!sintetica)
{
//ogni campo di footer F3 deve sommarsi a quello piu' esterno F2
TString ps = "MESSAGE ADD,F";
ps << (rep_sect.level() - 1) << '.' << new_field->id();
//deve anche sommarsi al totale delle Commesse Normali (che viene stampato al passaggio tra..
//..LEVEL=3 e LEVEL=4)
ps << "\nMESSAGE ADD,F2." << (new_field->id() + 200);
//setta il postscript al new_field
new_field->set_postscript(ps);
}
break;
case 1:
default:
break;
} //switch(rep_sect.level())
}
break;
default:
break;
@ -374,7 +350,7 @@ void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect, const TStr
bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testate, const int model_id,
const bool show_fasi, const bool show_cdc, const bool show_cms_descr,
const bool show_cms_date)
const bool show_cms_date, const bool sintetica)
{
//sezioni del report da modificare
TReport_section& b1 = section('B', 1);
@ -383,7 +359,7 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
TReport_field* b1_model = b1.find_field(model_id);
if (b1_model == NULL)
return false;
offset_and_fill_columns(b1, codici, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date);
offset_and_fill_columns(b1, codici, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date, sintetica);
//testate
//la testata di pagina deve invece riempire le intestazioni delle colonne generate
@ -393,55 +369,57 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
if (h0_model == NULL)
warning_box(TR("Manca l'intestazione della colonna modello (H0.%d)"),model_id);
else
offset_and_fill_columns(h0, testate, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date);
offset_and_fill_columns(h0, testate, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date, sintetica);
//le testate di sezione devono resettare i campi totale dei corrispondenti footers
for (int j = 4; j > 0; j--)
if (!sintetica)
{
TReport_section& head = section('H', j);
if (head.items() > 0)
for (int j = 4; j > 0; j--)
{
TString ps(256);
ps = "MESSAGE ";
//i campi dei totali da resettare sono tanti quante le colonne generate
//k=0 per includere la colonna 69!!! usata nel caso i ricavi siano solo di livello 1 (depth=1)
for (int k = 0; k <= codici.items(); k++)
{
if (k > 0)
ps << '|';
ps << "RESET,F" << head.level() << '.' << (k+model_id);
TReport_section& head = section('H', j);
if (head.items() > 0)
{
TString ps(256);
ps = "MESSAGE ";
//i campi dei totali da resettare sono tanti quante le colonne generate
//k=0 per includere la colonna 69!!! usata nel caso i ricavi siano solo di livello 1 (depth=1)
for (int k = 0; k <= codici.items(); k++)
{
if (k > 0)
ps << '|';
ps << "RESET,F" << head.level() << '.' << (k + model_id);
}
head.set_prescript(ps);
}
head.set_prescript(ps);
}
//footers
for (int i = find_max_level('F') - 1; i > 0; i--)
{
TReport_section& foot = section('F', i);
TReport_field* foot_model = foot.find_field(model_id);
if (foot_model == NULL)
warning_box(TR("Manca la colonna modello (F%d.%d)"), i, model_id);
else
offset_and_fill_columns(foot, codici, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date, sintetica);
}
//gestione della sezione con i totali di commessa (solo se esiste, visto che non c'e' in tutti i report)
TReport_section* f4 = find_section('F', 4);
if (f4 != NULL)
offset_and_fill_sectionf4(*f4, model_id);
}
//footers
for (int i = find_max_level('F') - 1; i > 0; i--)
{
TReport_section& foot = section('F', i);
TReport_field* foot_model = foot.find_field(model_id);
if (foot_model == NULL)
warning_box(TR("Manca la colonna modello (F%d.%d)"), i, model_id);
else
offset_and_fill_columns(foot, codici, model_id, show_fasi, show_cdc, show_cms_descr, show_cms_date);
}
//gestione della sezione con i totali di commessa (solo se esiste, visto che non c'e' in tutti i report)
TReport_section* f4 = find_section('F', 4);
if (f4 != NULL)
offset_and_fill_sectionf4(*f4, model_id);
#ifdef DBG
save("cazzone.rep");
#endif
#ifdef DBG
save("cazzone.rep");
#endif
return true;
}
TCRPA_report::TCRPA_report (const char* rep_name, const TString& prefix, const int depth,
const bool show_fasi, const bool show_cdc,
const bool show_cms_descr, const bool show_cms_date)
const bool show_cms_descr, const bool show_cms_date, const bool sintetica)
{
//che report usare?
load (rep_name);
@ -452,5 +430,5 @@ TCRPA_report::TCRPA_report (const char* rep_name, const TString& prefix, const i
//..da stampare fino al livello richiesto!
analize_pconana_structure (prefix, depth, codici, testate);
//poi vanno generate le colonne del report corrispondenti alla struttura analizzata
generate_columns (codici, testate, 69, show_fasi, show_cdc, show_cms_descr, show_cms_date);
generate_columns (codici, testate, 69, show_fasi, show_cdc, show_cms_descr, show_cms_date, sintetica);
}

View File

@ -727,10 +727,6 @@ void TPrint_saldana_recordset::parse_saldana(TAssoc_array* cms, const TDate& dat
//aggiorna totali della commessa (importi per codcms senza tener conto di fase o cdc)
TAssoc_array& riga_tot = get_row(_totali[indice], codcms, indice, codcms, EMPTY_STRING, EMPTY_STRING,
gruppo);
#ifdef DBG
if (codcms == "FP10VB22388OP" && indbil == 4)
int cazzone = 1;
#endif
aggiorna_importo(riga_tot, gruppo, indbil, saldana, false, true);
}
//stima ricavi ca3900 (_tipo=9)
@ -1636,9 +1632,8 @@ const TVariant& TPrint_saldana_recordset::get(const char* column_name) const
return NULL_VARIANT;
}
void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_sublevel)
void TPrint_saldana_recordset::set_filter(const TMask& msk, const char * curr_fase, const char * curr_cdc)
{
_fase = _cdc = "";
_forza_maturato = false;
//tira su un po' di parametri dalla maschera...
@ -1646,6 +1641,7 @@ void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_
_datacalcolo = msk.get_date(F_FINE_ES);
//prende anche il prefix
TString80 prefix;
for (short id = F_PRE1; id <= F_PRE3 && msk.id2pos(id) > 0; id++)
prefix << msk.get(id);
_indicatori.set_prefix(prefix);
@ -1662,8 +1658,10 @@ void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_
_tipostampa = msk.get_int(F_TIPOSTAMPA);
_detrazioni_consuntive = msk.get_bool(F_DETR_CONS);
//in base al tipo di stampa selezionata setta un po' di parametri
switch (_tipostampa)
_fase = curr_fase;
_cdc = curr_cdc;
//in base al tipo di stampa selezionata setta un po' di parametri ?? un po folle eliminato
/* switch (_tipostampa)
{
case 1:
_fase = msk.get(F_FASE);
@ -1678,14 +1676,14 @@ void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_
_cdc = msk.get(F_CDC);
break;
case 4:
_fase = curr_sublevel;
_fase = curr_fase;
break;
case 8:
_cdc = curr_sublevel;
_cdc = curr_cdc;
break;
default:
break;
}
}*/
} //if(tipo==8..
else
if (_tipo == 9)
@ -1694,8 +1692,8 @@ void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_
_include_documenti = msk.get_bool(F_INCLUDE_DOCUMENTI);
_tipostampa = msk.get_int(F_TIPOSTAMPA);
//in base al tipo di stampa selezionata setta un po' di parametri
switch (_tipostampa)
//in base al tipo di stampa selezionata setta un po' di parametri un po folle eliminato
/* switch (_tipostampa)
{
case 1:
_fase = msk.get(F_FASE);
@ -1711,6 +1709,6 @@ void TPrint_saldana_recordset::set_filter(const TMask& msk, const TString& curr_
break;
default:
break;
}
} */
}
}

View File

@ -42,16 +42,16 @@ protected:
void analize_pconana_structure (const TString& prefix, const int depth,
TString_array& codici, TString_array& testate) const;
bool generate_columns (TString_array& codici, TString_array& testate, const int model_id,
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date);
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date, const bool sintetica);
void offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr,
const int model_id, const bool show_fasi, const bool show_cdc,
const bool show_cms_descr, const bool show_cms_date);
const bool show_cms_descr, const bool show_cms_date, const bool sintetica);
void offset_and_fill_sectionf4(TReport_section& rep_sect, const int model_id);
int show_hide_left_column(const bool show_fld, TReport_field* fld, int x0);
public:
TCRPA_report (const char* rep_name, const TString& prefix, const int depth,
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date);
const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date, const bool sintetica);
};
///////////////////////////////////////////////////////////////
@ -138,7 +138,7 @@ protected:
const TDate& proroga = NULLDATE) const;
public:
virtual void set_filter(const TMask& msk, const TString& curr_sublevel);
virtual void set_filter(const TMask& msk, const char * curr_fase = "", const char * curr_cdc ="");
TPrint_saldana_recordset(int tipo) : _tipo(tipo) { }
};

View File

@ -20,6 +20,7 @@
#define F_INCLUDE_DOCUMENTI 116
#define F_SHOW_CMS_DESCR 117
#define F_SHOW_CMS_DATE 118
#define F_STAMPA_SINTETICA 119
/* campi per la generazione automatica
#define F_FASE1 112

View File

@ -184,7 +184,7 @@ void TPrint_stima_ricavi_rep::set_filter(const TPrint_stima_ricavi_mask& msk)
{
TPrint_stima_ricavi_recordset* recset = new TPrint_stima_ricavi_recordset();
recset->set_filter(msk, "");
recset->set_filter(msk);
TAnal_report::set_recordset(recset);
}