Patch level : 10.0 patch ???
Files correlati : lv2 lv2300a.rep lv2200z.rep Ricompilazione Demo : [ ] Commento : Sulla stampa dei giri, sia giornaliero che settimanale non funziona l'opzione di "utilizza mnemonico" git-svn-id: svn://10.65.10.50/branches/R_10_00@22175 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
03aefe6226
commit
ba4adf23ce
@ -2,7 +2,7 @@
|
||||
<report name="lv2200z" orientation="1" lpi="6" command="lv0 -1 lv2200z">
|
||||
<description>Stampa Giri Giornaliero</description>
|
||||
<font face="Courier New" size="10" />
|
||||
<section type="Head">
|
||||
<section type="Head" pattern="1">
|
||||
<field y="1" type="Testo" width="12" height="1.5" pattern="1" text="Data elab. :" />
|
||||
<field x="12.5" y="1" type="Stringa" width="12" height="1.5" pattern="1">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE _TODAY</prescript>
|
||||
@ -15,8 +15,8 @@
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE _PAGENO</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="1" />
|
||||
<section type="Head" level="2" height="10" page_break="1">
|
||||
<section type="Head" level="1" pattern="1" />
|
||||
<section type="Head" level="2" height="10" page_break="1" pattern="1">
|
||||
<groupby>DTCONS+CODITI</groupby>
|
||||
<field x="68" y="0.31" type="Array" width="25" height="1.5" pattern="1">
|
||||
<font face="Courier New" bold="1" size="14" />
|
||||
@ -89,12 +89,12 @@
|
||||
<field x="57" y="9" type="Testo" align="center" width="9" pattern="1" text="PASSAGGIO" />
|
||||
<field x="81.75" y="9.06" type="Testo" width="10.5" pattern="1" text="CONSEGNA" />
|
||||
</section>
|
||||
<section type="Body">
|
||||
<section type="Body" pattern="1">
|
||||
<field y="197" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>CODITI</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" level="1">
|
||||
<section type="Body" level="1" pattern="1">
|
||||
<field border="1" x="92.9" y="-0.07" type="Linea" height="4" pattern="1" />
|
||||
<field border="1" x="0.5" type="Linea" height="4" pattern="1" />
|
||||
<field x="1" type="Numero" align="right" width="5" pattern="1" hide_zero="1">
|
||||
@ -106,7 +106,7 @@
|
||||
</field>
|
||||
<field border="1" x="13.5" type="Linea" height="4" pattern="1" />
|
||||
<field x="14" type="Stringa" width="17" height="3" pattern="1">
|
||||
<source>303@.RAGSOC</source>
|
||||
<source>IF(#F_CHECK_MNEM=="X";303@.RICALT;303@.RAGSOC)</source>
|
||||
</field>
|
||||
<field border="1" x="31.37" type="Linea" height="4" pattern="1" />
|
||||
<field x="31.5" type="Stringa" width="25" height="2" pattern="1">
|
||||
@ -138,11 +138,10 @@
|
||||
</field>
|
||||
<field border="1" x="0.5" y="4" type="Linea" width="92.4" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2" />
|
||||
<sql>
|
||||
USE 167 KEY 2
|
||||
<section type="Foot" pattern="1" />
|
||||
<section type="Foot" level="1" pattern="1" />
|
||||
<section type="Foot" level="2" pattern="1" />
|
||||
<sql>USE 167 KEY 2
|
||||
SELECT (BETWEEN(CODITI,#FROM_CODITI,#TO_CODITI))(BETWEEN(CODAUT,#FROM_CODAUT,#TO_CODAUT))(BETWEEN(CODCF,#FROM_CODCF,#TO_CODCF))
|
||||
JOIN ITI ALIAS 300 INTO CODTAB==CODITI
|
||||
JOIN AUT TO 167 ALIAS 301 INTO CODTAB==CODAUT
|
||||
|
@ -3,6 +3,8 @@
|
||||
#include <reprint.h>
|
||||
#include <textset.h>
|
||||
|
||||
#include "clifo.h"
|
||||
|
||||
#include "lvlib.h"
|
||||
#include "lv2300a.h"
|
||||
|
||||
@ -17,12 +19,13 @@ public:
|
||||
struct TPassaggio: public TObject
|
||||
{
|
||||
long _codcf;
|
||||
TString80 _ragsoc;
|
||||
int _ordfer;
|
||||
int _ora;
|
||||
TString4 _iter;
|
||||
|
||||
TPassaggio() :_codcf(0),_ordfer(0),_ora(0) {}
|
||||
TPassaggio(long codcf, int ordfer, int ora, const TString& iter) :_codcf(codcf),_ordfer(ordfer),_ora(ora),_iter(iter) {}
|
||||
TPassaggio(long codcf, TString& ragsoc, int ordfer, int ora, const TString& iter) :_codcf(codcf),_ragsoc(ragsoc),_ordfer(ordfer),_ora(ora),_iter(iter) {}
|
||||
};
|
||||
|
||||
class TPassaggi: public TArray
|
||||
@ -137,7 +140,7 @@ class TItinerari: public TArray
|
||||
{
|
||||
public:
|
||||
void add(long i,int g,TPassaggio* p);
|
||||
void add(long i,int g,long codcf, int ordfer, int ora,TString iter);
|
||||
void add(long i,int g,long codcf, TString& ragsoc, int ordfer, int ora,TString& iter);
|
||||
TSettimana& settimana(long codIti);
|
||||
};
|
||||
|
||||
@ -146,9 +149,9 @@ void TItinerari::add(long i,int g,TPassaggio* p)
|
||||
settimana(i).add(g,p);
|
||||
}
|
||||
|
||||
void TItinerari::add(long i,int g,long codcf, int ordfer, int ora, TString iter)
|
||||
void TItinerari::add(long i,int g,long codcf, TString& ragsoc, int ordfer, int ora, TString& iter)
|
||||
{
|
||||
TPassaggio* p = new TPassaggio(codcf,ordfer,ora,iter);
|
||||
TPassaggio* p = new TPassaggio(codcf,ragsoc,ordfer,ora,iter);
|
||||
add(i,g,p);
|
||||
}
|
||||
TSettimana& TItinerari::settimana(long codIti)
|
||||
@ -193,6 +196,8 @@ protected:
|
||||
|
||||
void TGiri_app::elabora(const TMask& mask) const
|
||||
{
|
||||
const bool mnemonico = mask.get_bool(F_CHECK_MNEM_TO);
|
||||
|
||||
TISAM_recordset giri("USE LVRCONSPLAN KEY 2\n"
|
||||
"SELECT (BETWEEN(CODITI,#FROM_CODITI,#TO_CODITI))"
|
||||
"&&(BETWEEN(CODCF,#FROM_CODCF,#TO_CODCF))"
|
||||
@ -223,17 +228,25 @@ void TGiri_app::elabora(const TMask& mask) const
|
||||
int ordfer = giri.get("ORDFER").as_int();
|
||||
int ora = 0; //in attesa che venga inserito
|
||||
|
||||
iti.add(itinerario,wday,cliente,ordfer,ora,iter);
|
||||
TToken_string key;
|
||||
key.add('C');
|
||||
key.add(cliente);
|
||||
TString80 ragsoc = cache().get(LF_CLIFO, key, mnemonico ? CLI_RICALT : CLI_RAGSOC);
|
||||
|
||||
iti.add(itinerario,wday,cliente,ragsoc,ordfer,ora,iter);
|
||||
}
|
||||
|
||||
|
||||
TGiri_report r(true);
|
||||
TGiri_recordset* giri_set = new TGiri_recordset();
|
||||
|
||||
giri_set->set_var("#F_CHECK_MNEM",TVariant(mask.get(F_CHECK_MNEM_TO)));
|
||||
giri_set->set_var("#F_CHECK_MNEM",TVariant(mnemonico));
|
||||
r.set_recordset(giri_set);
|
||||
FOR_EACH_ARRAY_ITEM(iti,i,obj)//scandisce itinerario e tiene
|
||||
//buoni solo quelli valorizzati
|
||||
#ifdef DBG
|
||||
//const long cazzoni = giri_set->items();
|
||||
//giri_set->save_as("C:/tmp/cazzone.txt", fmt_text);
|
||||
#endif
|
||||
|
||||
FOR_EACH_ARRAY_ITEM(iti, i, obj) //scandisce itinerario e tiene buoni solo quelli valorizzati
|
||||
{
|
||||
TSettimana& s = *(TSettimana*) obj;
|
||||
const int max = s.passaggi();
|
||||
@ -251,7 +264,7 @@ void TGiri_app::elabora(const TMask& mask) const
|
||||
const TPassaggio& pass = s.passaggio(g,j);
|
||||
const int column = (g-1) * 3 + 1;
|
||||
|
||||
giri_set->set(column,pass._codcf);
|
||||
giri_set->set(column,pass._ragsoc);
|
||||
giri_set->set(column + 1, TVariant(long (pass._ordfer)));
|
||||
giri_set->set(column + 2, TVariant(long (pass._ora)));
|
||||
}
|
||||
@ -266,6 +279,11 @@ void TGiri_app::elabora(const TMask& mask) const
|
||||
giri_set->set_var(varname, giri.get_var(varname), true);
|
||||
}
|
||||
|
||||
#ifdef DBG
|
||||
const long cazzoni = giri_set->items();
|
||||
giri_set->save_as("C:/tmp/cazzone.xls", fmt_html);
|
||||
#endif
|
||||
|
||||
TReport_book b;
|
||||
bool ok = b.add(r);// Richiede parametri di stampa in base alla maschera omonima
|
||||
if (ok)
|
||||
|
@ -2,7 +2,7 @@
|
||||
<report name="lv2300a" orientation="2" lpi="6">
|
||||
<description>Stampa Giri Settimanale</description>
|
||||
<font face="Courier New" size="10" />
|
||||
<section type="Head">
|
||||
<section type="Head" pattern="1">
|
||||
<field x="1.5" type="Testo" width="12" height="1.5" pattern="1" text="Data elab. :" />
|
||||
<field x="14" type="Stringa" width="12" height="1.5" pattern="1">
|
||||
<prescript>MESSAGE _TODAY</prescript>
|
||||
@ -15,8 +15,8 @@
|
||||
<prescript>MESSAGE _PAGENO</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="1" />
|
||||
<section repeat="1" type="Head" level="2" height="3" page_break="1">
|
||||
<section type="Head" level="1" pattern="1" />
|
||||
<section repeat="1" type="Head" level="2" height="3" page_break="1" pattern="1">
|
||||
<groupby>A</groupby>
|
||||
<field x="2" type="Testo" width="10" pattern="1" text="Itinerario:">
|
||||
<font face="Courier New" bold="1" size="8" />
|
||||
@ -78,8 +78,8 @@
|
||||
<prescript description="H2.2000 PRESCRIPT">MESSAGE _ISAMREAD,163,MOD='LV'!COD='AUT'!CODTAB=H2.1000,S0</prescript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Body" />
|
||||
<section type="Body" level="1" height="2">
|
||||
<section type="Body" pattern="1" />
|
||||
<section type="Body" level="1" height="2" pattern="1">
|
||||
<font face="Courier New" size="8" />
|
||||
<field border="1" x="0.5" type="Linea" height="2" pattern="1" />
|
||||
<field border="1" x="19" type="Linea" height="2" pattern="1" />
|
||||
@ -91,21 +91,18 @@
|
||||
<field border="1" x="133" type="Linea" height="2" pattern="1" />
|
||||
<field x="1" y="0.5" type="Stringa" width="15" pattern="1">
|
||||
<source>B</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="16.5" y="0.5" type="Numero" align="right" width="2" pattern="1" hide_zero="1">
|
||||
<source>C</source>
|
||||
</field>
|
||||
<field x="20" y="0.5" type="Stringa" width="15" pattern="1">
|
||||
<source>E</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="35.5" y="0.5" type="Numero" align="right" width="2" pattern="1" hide_zero="1">
|
||||
<source>F</source>
|
||||
</field>
|
||||
<field x="39" y="0.5" type="Stringa" width="15" pattern="1">
|
||||
<source>H</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="54.5" y="0.5" type="Numero" align="right" width="2" pattern="1" hide_zero="1">
|
||||
<source>I</source>
|
||||
@ -119,29 +116,26 @@
|
||||
</field>
|
||||
<field x="77" y="0.5" type="Stringa" width="15" pattern="1">
|
||||
<source>N</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="92.5" y="0.5" type="Numero" align="right" width="2" pattern="1" hide_zero="1">
|
||||
<source>O</source>
|
||||
</field>
|
||||
<field x="96" y="0.5" type="Stringa" width="15" pattern="1">
|
||||
<source>Q</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="111.5" y="0.5" type="Numero" align="right" width="2" pattern="1" hide_zero="1">
|
||||
<source>R</source>
|
||||
</field>
|
||||
<field x="115" y="0.5" type="Stringa" width="15" pattern="1">
|
||||
<source>T</source>
|
||||
<prescript description="B1.0 PRESCRIPT">MESSAGE _ISAMREAD,CLIFO,TIPOCF='C'!CODCF=#THIS,RAGSOC</prescript>
|
||||
</field>
|
||||
<field x="130.5" y="0.5" type="Numero" align="right" width="2" pattern="1" hide_zero="1">
|
||||
<source>U</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
<section type="Foot" level="1" />
|
||||
<section type="Foot" level="2">
|
||||
<section type="Foot" pattern="1" />
|
||||
<section type="Foot" level="1" pattern="1" />
|
||||
<section type="Foot" level="2" pattern="1">
|
||||
<field border="2" x="0.5" y="0.01" type="Linea" width="132.5" height="0" pattern="1" />
|
||||
</section>
|
||||
</report>
|
Loading…
x
Reference in New Issue
Block a user