Patch level : 2.2
Files correlati : ve1 Ricompilazione Demo : [ ] Commento : Stampatore universle report vendite git-svn-id: svn://10.65.10.50/trunk@13146 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7fc6f05e7f
commit
00d73704f8
@ -138,32 +138,36 @@ public:
|
||||
virtual ~TDocument_recordset() { }
|
||||
};
|
||||
|
||||
const TVariant& TDocument_recordset::get(int logic, const char* field) const
|
||||
const TVariant& TDocument_recordset::get(int num, const char* field) const
|
||||
{
|
||||
const int idx = relation()->log2ind(logic);
|
||||
const int idx = relation()->log2ind(num);
|
||||
if (idx < 0)
|
||||
return NULL_VARIANT;
|
||||
|
||||
const TRectype& rec = relation()->file(idx).curr();
|
||||
logic = rec.num();
|
||||
|
||||
if ((logic == LF_DOC || logic == LF_RIGHEDOC) && rec.type(field) == _nullfld)
|
||||
const int logic = rec.num();
|
||||
if (logic == LF_DOC || logic == LF_RIGHEDOC)
|
||||
{
|
||||
TDocumento& doc = ((TDocument_cache&)_cache).doc(rec);
|
||||
TVariant& var = get_tmp_var();
|
||||
if (logic == LF_DOC)
|
||||
// Se non e' un campo standard, ma e' calcolato da una formula...
|
||||
if (rec.type(field) == _nullfld)
|
||||
{
|
||||
var = doc.get(field);
|
||||
const TDocumento& doc = ((TDocument_cache&)_cache).doc(rec);
|
||||
TVariant& var = get_tmp_var();
|
||||
const TFieldref ref(field, logic);
|
||||
if (logic == LF_DOC)
|
||||
{
|
||||
var = ref.read(doc);
|
||||
}
|
||||
else
|
||||
{
|
||||
const int nriga = rec.get_int(RDOC_NRIGA);
|
||||
const TRiga_documento& rdoc = doc[nriga];
|
||||
var = ref.read(rdoc);
|
||||
}
|
||||
return var;
|
||||
}
|
||||
else
|
||||
{
|
||||
const int nriga = rec.get_int(RDOC_NRIGA);
|
||||
const TRiga_documento& rdoc = doc[nriga];
|
||||
var = rdoc.get(field);
|
||||
}
|
||||
return var;
|
||||
}
|
||||
return TISAM_recordset::get(logic, field);
|
||||
return TISAM_recordset::get(num, field);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user