From 17851f127a42173ef469a5c97a5e003ccf02d9bd Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 3 Nov 2010 23:10:12 +0000 Subject: [PATCH] Patch level : 10.0 no patch Files correlati : pd6342.exe Ricompilazione Demo : [ ] Commento : Saldi per commessa e conto Haiblliita git-svn-id: svn://10.65.10.50/branches/R_10_00@21101 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ps/pd6342500.cpp | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/ps/pd6342500.cpp b/ps/pd6342500.cpp index 23b1e6306..21ec39481 100755 --- a/ps/pd6342500.cpp +++ b/ps/pd6342500.cpp @@ -62,23 +62,28 @@ class TBilancio_recset : public TCSV_recordset public: TBit_array & tot_rows() { return _tot_rows;} TBit_array & tot_gen() { return _tot_gen;} - virtual bool get_attr(int column, TAttributes & attr) const; + virtual bool get_attr(int column, TAttributes & attr, bool header = false) const; TBilancio_recset(const TMask & m); }; -bool TBilancio_recset::get_attr(int column, TAttributes & attr) const +bool TBilancio_recset::get_attr(int column, TAttributes & attr, bool header) const { const TRecnotype rowno = current_row(); - if (rowno == 0L && column > 1) + if ((rowno == 0L || header)) { - if ((unsigned int) column >= columns() - 1) - attr.set_background(COLOR_RED); + if (column > 1) + { + if ((unsigned int) column >= columns() - 1) + attr.set_background(COLOR_RED); + else + attr.set_background(header_back[_group[column - 2] % 6]); + attr.set_foreground(COLOR_WHITE); + return true; + } else - attr.set_background(header_back[_group[column - 2] % 6]); - attr.set_foreground(COLOR_WHITE); - return true; + return false; } else if (_tot_rows[rowno] || _tot_rows_ind[rowno]) @@ -184,6 +189,7 @@ TBilancio_recset::TBilancio_recset(const TMask & m) : TCSV_recordset("CSV(;)\n") } _group[i] = group; colname = cmskey; + colname.replace('|', '-'); create_column(colname, _realfld); } create_column("Totale", _realfld); @@ -191,8 +197,6 @@ TBilancio_recset::TBilancio_recset(const TMask & m) : TCSV_recordset("CSV(;)\n") TRecnotype sheet_row = new_rec(""); TString descr; - set(0, "Conto"); - set(1, "Descrizione"); for (int c = 0; c < ncols; c++) { cmskey = colkeys.row(c); @@ -201,10 +205,10 @@ TBilancio_recset::TBilancio_recset(const TMask & m) : TCSV_recordset("CSV(;)\n") descr.cut(0); descr << cache().get(LF_COMMESSE, cms, COMMESSE_DESCRIZ); - descr << " - " << cache().get(LF_FASI, cmskey, FASI_DESCRIZ); + descr << "-" << cache().get(LF_FASI, cmskey, FASI_DESCRIZ); set(c + 2, descr); } - set(ncols + 2, "Totale "); + set(ncols + 2, " "); long start_rec = -1; int nrows = rowkeys.items();