Patch level : 2.2 66

Files correlati     :  ca1.exe
Ricompilazione Demo : [ ]
Commento            :

Funziona un'po stampe anagrafiche


git-svn-id: svn://10.65.10.50/trunk@12894 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2005-04-01 15:16:14 +00:00
parent 53ec9e52b5
commit 4054081514
11 changed files with 77 additions and 40 deletions

View File

@ -20,12 +20,16 @@ public:
TMask_print_pdc::TMask_print_pdc()
:TAutomask("ca1400a")
{
ca_create_fields(*this, LF_PCONANA, 2, 2, F_DACONTO, F_DACONTO + 100, 0x0, "#DACONTO");
int nfields = ca_create_fields(*this, LF_PCONANA, 2, 8, F_ACONTO, F_ACONTO + 100, 0x0, "#ACONTO");
ca_create_fields(*this, LF_PCONANA, 3, 2, F_DACONTO, F_DACONTO + 100, 0x0, "#DACONTO");
int nfields = ca_create_fields(*this, LF_PCONANA, 3, 8, F_ACONTO, F_ACONTO + 100, 0x0, "#ACONTO");
for (int i = 0; i < nfields; i++)
{
field(F_DACONTO + i).set_group(1);
field(F_ACONTO + i).set_group(2);
TMask_field& daconto = field(F_DACONTO + i);
daconto.set_group(1);
daconto.check_type(CHECK_NORMAL);
TMask_field& aconto = field(F_ACONTO + i);
aconto.set_group(2);
aconto.check_type(CHECK_NORMAL);
}
}

View File

@ -49,7 +49,7 @@
</section>
<section type="Foot" />
<section type="Foot" level="1" />
<sql>USE 106
FROM #DACONTO
TO #ACONTO</sql>
<sql>USE PCONANA
FROM CODCONTO=#DACONTO
TO CODCONTO=#ACONTO</sql>
</report>

View File

@ -2,12 +2,12 @@
PAGE "Stampa piano dei conti analitica" -1 -1 80 17
GROUPBOX DLG_NULL 78 6
GROUPBOX DLG_NULL 77 6
BEGIN
PROMPT 2 1 "Da conto"
END
GROUPBOX DLG_NULL 78 6
GROUPBOX DLG_NULL 77 6
BEGIN
PROMPT 2 7 "A conto"
END

View File

@ -19,10 +19,16 @@ public:
TMask_print_cdc::TMask_print_cdc()
:TAutomask("ca1500a")
{
ca_create_fields(*this, LF_CDC, 2, 2, F_DACDC, F_DACDC + 100, 0x0, "#DACDC");
int nfields = ca_create_fields(*this, LF_CDC, 2, 8, F_ACDC, F_ACDC + 100, 0x0, "#ACDC");
ca_create_fields(*this, LF_CDC, 3, 2, F_DACDC, F_DACDC + 100, 0x0, "#DACDC");
int nfields = ca_create_fields(*this, LF_CDC, 3, 8, F_ACDC, F_ACDC + 100, 0x0, "#ACDC");
for (int i = 0; i < nfields; i++)
{
TMask_field& dacdc = field(F_DACDC + i);
dacdc.set_group(1);
dacdc.check_type(CHECK_NORMAL);
TMask_field& acdc = field(F_ACDC + i);
acdc.set_group(2);
acdc.check_type(CHECK_NORMAL);
field(F_DACDC + i).set_group(1);
field(F_ACDC + i).set_group(2);
}

View File

@ -55,7 +55,7 @@
</section>
<section type="Foot" />
<section type="Foot" level="1" />
<sql>USE 146
FROM #DACDC
TO #ACDC</sql>
<sql>USE CDC
FROM CODCOSTO=#DACDC
TO CODCOSTO=#ACDC</sql>
</report>

View File

@ -2,12 +2,12 @@
PAGE "Stampa centri di costo" -1 -1 80 17
GROUPBOX DLG_NULL 78 6
GROUPBOX DLG_NULL 77 6
BEGIN
PROMPT 2 1 "Da centro di costo"
END
GROUPBOX DLG_NULL 78 6
GROUPBOX DLG_NULL 77 6
BEGIN
PROMPT 2 7 "A centro di costo"
END

View File

@ -19,12 +19,16 @@ public:
TMask_print_cms::TMask_print_cms()
:TAutomask("ca1600a")
{
ca_create_fields(*this, LF_COMMESSE, 2, 2, F_DACMS, F_DACMS + 100, 0x0, "#DACMS");
int nfields = ca_create_fields(*this, LF_COMMESSE, 2, 8, F_ACMS, F_ACMS + 100, 0x0, "#ACMS");
ca_create_fields(*this, LF_COMMESSE, 3, 2, F_DACMS, F_DACMS + 100, 0x0, "#DACMS");
int nfields = ca_create_fields(*this, LF_COMMESSE, 3, 8, F_ACMS, F_ACMS + 100, 0x0, "#ACMS");
for (int i = 0; i < nfields; i++)
{
field(F_DACMS + i).set_group(1);
field(F_ACMS + i).set_group(2);
TMask_field& dacms = field(F_DACMS + i);
dacms.set_group(1);
dacms.check_type(CHECK_NORMAL);
TMask_field& acms = field(F_ACMS + i);
acms.set_group(2);
acms.check_type(CHECK_NORMAL);
}
}

View File

@ -37,7 +37,7 @@
</section>
<section type="Foot" />
<section type="Foot" level="1" />
<sql>USE 147
FROM #DACMS
TO #ACMS</sql>
<sql>USE COMMESSE
FROM CODCMS=#DACMS
TO CODCMS=#ACMS</sql>
</report>

View File

@ -2,12 +2,12 @@
PAGE "Stampa commesse" -1 -1 80 17
GROUPBOX DLG_NULL 78 6
GROUPBOX DLG_NULL 77 6
BEGIN
PROMPT 2 1 "Da commess"
END
GROUPBOX DLG_NULL 78 6
GROUPBOX DLG_NULL 77 6
BEGIN
PROMPT 2 7 "A commessa"
END

View File

@ -8,10 +8,12 @@
class TMask_print_fasi : public TAutomask
{
int _nfields;
protected:
bool on_field_event(TOperable_field& o, TField_event e, long jolly) {return true;}
public:
int nfields() { return _nfields; }
TMask_print_fasi();
virtual ~TMask_print_fasi() {}
};
@ -20,10 +22,10 @@ TMask_print_fasi::TMask_print_fasi()
:TAutomask("ca1700a")
{
ca_create_fields(*this, LF_FASI, 3, 2, F_DAFASE, F_DAFASE + 100);
int nfields = ca_create_fields(*this, LF_FASI, 3, 9, F_AFASE, F_AFASE + 100);
_nfields = ca_create_fields(*this, LF_FASI, 3, 9, F_AFASE, F_AFASE + 100);
TString80 workstring;
for (int i = 0; i < nfields; i++)
for (int i = 0; i < _nfields; i++)
{
TEdit_field& dafase = efield(F_DAFASE + i);
dafase.set_group(1);
@ -71,8 +73,29 @@ void TPrint_fasi::main_loop()
if (path.empty())
path = "ca1700";
rep.load(path);
rep.load(path);
rep.mask2report(m);
const TMultilevel_code_info& main_info = ca_multilevel_code_info(LF_FASI);
if (main_info.parent() == 0)
{
TRecordset* rset = rep.recordset();
if (rset != NULL)
{
TVariant var;
var = "";
rset->set_var("#DACODCMSFAS", var);
TString fs;
for (int i = 0 ; fs.empty() && i < m.nfields(); i++)
fs << m.field(F_AFASE + i).get();
if (fs.empty())
var = "zzzzzzzzzzzz";
rset->set_var("#ACODCMSFAS", var);
}
}
book.add(rep);
book.print_or_preview();
}

View File

@ -16,19 +16,19 @@
<field y="2" type="Testo" align="center" width="80" height="2" pattern="1" text="Stampa Fasi Analitica">
<font face="Courier New" bold="1" size="16" />
</field>
<field y="4.5" type="Testo" width="22" pattern="1" text="Codice commessa&#2F;fase">
<field y="4.25" type="Testo" width="12" pattern="1" text="Codice fase">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="26" y="4.5" type="Testo" width="20" pattern="1" text="Descrizione">
<field x="26" y="4.25" type="Testo" width="20" pattern="1" text="Descrizione">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="59" y="4.5" type="Testo" width="11" pattern="1" text="Data inizio">
<field x="59" y="4.25" type="Testo" width="11" pattern="1" text="Data inizio">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="70" y="4.5" type="Testo" width="10" pattern="1" text="Data fine">
<field x="70" y="4.25" type="Testo" width="10" pattern="1" text="Data fine">
<font face="Courier New" bold="1" size="10" />
</field>
<field y="5.25" type="Testo" width="12" pattern="1" text="Codice fase">
<field y="5.25" type="Testo" width="22" pattern="1" text="Codice commessa&#2F;costo">
<font face="Courier New" bold="1" size="10" />
</field>
<field x="59" y="5.25" type="Testo" width="11" pattern="1" text="Proroga">
@ -39,9 +39,9 @@
<section type="Head" level="1" />
<section type="Body" />
<section type="Body" level="1">
<field type="Stringa" width="25" pattern="1">
<source>CODCMSFAS</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE_FORMAT_CMSCDC</prescript>
<field type="Stringa" width="15" pattern="1">
<source>CODFASE</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE_FORMAT_FASE</prescript>
</field>
<field x="25" type="Stringa" dynamic_height="1" width="34" height="2" pattern="1">
<source>DESCRIZ</source>
@ -52,9 +52,9 @@
<field x="70" type="Data" width="10" pattern="1">
<source>DATAFINE</source>
</field>
<field y="1" type="Stringa" width="15" pattern="1">
<source>CODFASE</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE_FORMAT_FASE</prescript>
<field y="1" type="Stringa" width="25" pattern="1">
<source>CODCMSFAS</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE_FORMAT_CMSCDC</prescript>
</field>
<field x="59" y="1" type="Data" width="10" pattern="1">
<source>DATAPROR</source>