Patch level : 12.0 1086

Files correlati     : ci1300ab.rep ci1300bb.rep ci1300a.rep ci1300a.msk ci1300b.rep ci1.exe

Commento        :

Aggiunti report per beneficiario alla stampa ore per risorsa/attrezzatura

aggiunto logo del beneficiario

sintassi da mettere nel prescript del campo immagine :
LOGO_BENEF
#THIS !

L'Id dell'immagine deve essere LOGO+<codice tipo lavoro>
This commit is contained in:
Alessandro Bonazzi 2021-10-14 17:59:01 +02:00
parent c9e9b2ba47
commit c93ec50c0d

View File

@ -1166,10 +1166,12 @@ void TBook::draw_image(const TReport_rct& rect, const char* filename, const char
{
TReport_rct new_rect(rect);
if (resize && *resize)
if (resize && *resize && filename && *filename)
{
TImage* img = _images.image(filename);
if (img != nullptr)
{
switch (resize[0])
{
case 'N':
@ -1182,7 +1184,7 @@ void TBook::draw_image(const TReport_rct& rect, const char* filename, const char
short old_ysize = rect.height();
long new_ysize = rect.width() * ratio / 100000L;
TReport_size s(rect.width(), (new_ysize * lpi()) / cpi());
TReport_pnt o(rect.left(), rect.top() + ((old_ysize - new_ysize) * cpi())/ (2 * lpi()));
TReport_pnt o(rect.left(), rect.top() + ((old_ysize - new_ysize) * cpi()) / (2 * lpi()));
new_rect.set(o, s);
}
@ -1202,6 +1204,7 @@ void TBook::draw_image(const TReport_rct& rect, const char* filename, const char
break;
}
}
}
define_frame(new_rect);
*_out << "<image src=\"" << filename << "\" />" << endl;
}