diff --git a/include/report.cpp b/include/report.cpp index 9cbcb4402..fa81c4973 100755 --- a/include/report.cpp +++ b/include/report.cpp @@ -927,10 +927,10 @@ bool TReport_field::dynamic_height() const const TRectangle& TReport_field::get_draw_rect() const { + TRectangle& rct = ((TReport_field*)this)->_draw_rct; if (dynamic_height()) { - TRectangle& rct = ((TReport_field*)this)->_draw_rct; - rct = _rct; + // rct = _rct; int h = 100; TParagraph_string str(formatted_text(), rct.width()/100); @@ -942,9 +942,9 @@ const TRectangle& TReport_field::get_draw_rect() const if (h > _rct.height()) h = _rct.height(); rct.set_height(h); - return rct; +// return rct; } - return _rct; + return rct; } const TReport_font& TReport_field::font() const @@ -2082,7 +2082,8 @@ bool TReport::do_message(const TVariant& var, FLDMSG_FUNC msg, void* jolly) case 4: // E' un gruppo { TReport_section& sec = section(type, level); - for (int i = 0; i < sec.items(); i++) + const int items = sec.items(); + for (int i = 0; i < items; i++) { TReport_field& rf = sec.field(i); if (rf.in_group(id)) diff --git a/include/reprint.cpp b/include/reprint.cpp index d832bd7d0..3b3e7103c 100755 --- a/include/reprint.cpp +++ b/include/reprint.cpp @@ -1722,7 +1722,8 @@ bool TReport_book::add(TReport& rep, bool progind) TReport_section* fl = _report->find_section('F',1); if (fl != NULL) // Gestione footer last (se esite) { - const int fy = fl->pos().y; + const TReport_section& fp = _report->section('F',0); + const int fy = fp.pos().y; if (fy > 0) // Ha una coordinata y imposta { if (fy < _delta.y) // Sono gia' andato oltre quindi salto pagina @@ -1732,7 +1733,7 @@ bool TReport_book::add(TReport& rep, bool progind) } _delta.x = 0; _delta.y = fy; - + // Azzero temporaneamente le dimensioni del footer per evitare salti pagina const int lfp = _logical_foot_pos; _logical_foot_pos = _logical_page_height;