Показать сообщение отдельно
Старый 25.06.2005, 13:58   #8  
George Nordic is offline
George Nordic
Модератор
Аватар для George Nordic
Злыдни
 
4,480 / 1255 (50) ++++++++
Регистрация: 17.12.2003
Адрес: Moscow
Записей в блоге: 9
Try to check nessesary space before printing. If u've got space enouth, call section, or insert page break otherwise.
Something like this:
PHP код:
    boolean  fEndLine false;
    
int      q1q2q3q4;
   ;
    
/* Debuging information, uncomment to see the nessasary parameters
    q1 = element.getPageHeight();
    q2 = element.currentYmm100()/100;
    q3 = CustInvoiceTransLog_FLX_Body_4.heightValue();
    q4 = PageFooter_Sum.heightValue();
    */

    
if ((lineNum != 0) &&(cntRec lineNum) == 1//if you want print summary with the LAST record 
    
{
        if (   
//sum all sections, then check height
            
((element.getPageHeight() - element.currentYmm100()/100) <=
            (.....
ctrlBody.heightValue() +
             
PageFooter_Sum.heightValue() + ctrlReportFooterSum.heightValue()+
             
ctrlFooterInv1.heightValue() + ctrlFooterInv2.heightValue())) &&
            ((
element.getPageHeight() - element.currentYmm100()/100) > 0)
            )
        {
            
fEndLine true//need to insert page breaking
            
element.executeSection(ctrlPageFooterSum);
            
element.newPage();
        }