Patch level : 2.1 086
Files correlati : ve1.exe ba8.exe Ricompilazione Demo : [ ] Commento : Il riconoscimento dell'ID dei Campi non funziona più (#XX) causando quindi problemi anche sul MESSAGE _STREXPR o _NUMEXPR Codice : AO21022 git-svn-id: svn://10.65.10.50/trunk@12240 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
206234636c
commit
ed595d7575
@ -168,13 +168,16 @@ fraction::fraction(const fraction& b)
|
||||
|
||||
fraction::fraction(const real& num, const real& den)
|
||||
{
|
||||
if (den == UNO)
|
||||
build_fraction(num.stringa());
|
||||
else
|
||||
{
|
||||
real n = num; n /= den;
|
||||
build_fraction(n.stringa());
|
||||
}
|
||||
if (den == ZERO)
|
||||
build_fraction("");
|
||||
else
|
||||
if (den == UNO)
|
||||
build_fraction(num.stringa());
|
||||
else
|
||||
{
|
||||
real n = num; n /= den;
|
||||
build_fraction(n.stringa());
|
||||
}
|
||||
}
|
||||
|
||||
int fraction::sign() const
|
||||
|
@ -1585,8 +1585,13 @@ const char* real::string(const char *picture) const
|
||||
// Certified 50%
|
||||
const char* real::format(const char *picture) const
|
||||
{
|
||||
fatal_box("NOT IMPLEMENTED");
|
||||
return picture;
|
||||
if (*picture == '\0')
|
||||
return string ();
|
||||
|
||||
TString& f = get_tmp_string();
|
||||
|
||||
dsprintf (f.get_buffer(), (char*)(const char*)picture, ptr());
|
||||
return (const char *) f;
|
||||
}
|
||||
|
||||
// Certified 99%
|
||||
|
@ -474,6 +474,8 @@ bool TReport_section::load_fields()
|
||||
for (int i = 0; i < items(); i++)
|
||||
{
|
||||
TReport_field& f = field(i);
|
||||
|
||||
report().set_curr_field(&f);
|
||||
f.load_field();
|
||||
}
|
||||
}
|
||||
@ -1729,8 +1731,11 @@ bool TReport::evaluate(const char* expr, TVariant& var, TFieldtypes force_type)
|
||||
var = name;
|
||||
if (var.is_string())
|
||||
e.setvar(i, var.as_string());
|
||||
else
|
||||
e.setvar(i, var.as_real());
|
||||
else
|
||||
if (var.is_date())
|
||||
e.setvar(i, var.as_date().string());
|
||||
else
|
||||
e.setvar(i, var.as_real());
|
||||
}
|
||||
|
||||
const TFieldtypes ft = force_type != _nullfld ? force_type : var.type();
|
||||
|
@ -29,6 +29,7 @@ protected:
|
||||
public:
|
||||
TFieldtypes type() const { return _type; } // Internal use only
|
||||
bool is_string() const { return _type == _alfafld; }
|
||||
bool is_date() const { return _type == _datefld; }
|
||||
bool is_empty() const;
|
||||
bool is_null() const { return _type == _nullfld; }
|
||||
bool is_zero() const;
|
||||
|
@ -48,6 +48,8 @@ TRiga_documento& TDoc_recordset::riga_doc(int n) const
|
||||
n = _mypos+1;
|
||||
if (n > _doc->rows())
|
||||
n = _doc->new_row().get_int(RDOC_NRIGA);
|
||||
if (n <= 0)
|
||||
n = 1;
|
||||
return (*_doc)[n];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user