Hi,
i have the following code in the body-section of my pdf report:
/*------------------ Page 1 -----------------*/
sc_pdf_print_img($cell_BarcodeNachweisID, 0, 0);
sc_pdf_print($cell_DebitorName1);
sc_pdf_print($cell_Ansprechpartner);
sc_pdf_print($cell_DebitorStrasse);
sc_pdf_print($cell_DebitorPLZ);
sc_pdf_print($cell_DebitorOrt);
sc_pdf_set_y(115);
foreach ({NachweisDetails} as $NM_ind => $Dados)
{
sc_pdf_print_sub_sel($cell_NachweisDetails_Datum[$NM_ind]);
sc_pdf_print_sub_sel($cell_NachweisDetails_Start[$NM_ind]);
sc_pdf_print_sub_sel($cell_NachweisDetails_Ende[$NM_ind]);
sc_pdf_print_sub_sel_mult($cell_NachweisDetails_Beschreibung[$NM_ind], 4.23333333333);
sc_pdf_print_sub_sel($cell_NachweisDetails_AnzahlAE[$NM_ind]);
sc_pdf_print_sub_sel($cell_NachweisDetails_Anfahrt[$NM_ind]);
sc_pdf_sub_sel_end(5);
if (sc_pdf_get_y() >= 220)
{
sc_pdf_add_page();
sc_pdf_set_y(115);
}
}
sc_pdf_print($cell_MitarbeiterID);
sc_pdf_print($cell_Datum);
/-------------------------------------------/
The code is originally from SC, except the bold marked code. I will generate a new page, when the number of subitems no longer fits on the current page.
This works, but only for the next (one) position. sc_pdf_get_y() is then at once greater than 220, although it should be no more than 120. Looks as if an internal counter is not reset in SC …