Announcement

Collapse
No announcement yet.

subselect - Change page to each record

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • subselect - Change page to each record

    Hello,
    I have a problem when I create pdf report.
    in a subselect, I can retrieve more records. when the page (A4) is completed, each record is printed on a new page.

    the code below
    foreach ({historique_mediation} as $NM_ind => $Dados)
    {

    sc_pdf_print_sub_sel($cell_historique_mediation_da te_mediation[$NM_ind]);
    sc_pdf_print_sub_sel_mult($cell_historique_mediati on_txt_mediation[$NM_ind], 5);
    sc_pdf_sub_sel_end(4);
    sc_pdf_set_auto_page_break('auto',10);
    }
    some ideas ?

    version : ScriptCase Devel: 7.1.013

    Thanks

  • #2
    I have also same problem.
    Is there anybody who knows whether there is a solution for this problem or not ?


    Thanks

    Comment


    • #3
      I recommend using sc_pdf_add_page ()
      and the type of report to be record per line. although I'm still with some details.

      Comment


      • #4
        I have also same problem. Alenso: And type of report to be record per line does not work because you can not insert text spacing as lines or titles.

        HELP FOR THIS WRONG.

        Comment


        • #5
          I have also same problem. sc_pdf_add_page () not work. No reset row (y) and appropriately.
          sc_pdf_get_y() not work.

          Comment


          • #6
            I hope this useful for someting

            I solved, that problem here the code:

            Code:
            sc_pdf_add_page('P', 'Letter');
            			sc_pdf_image('BITACORA.png',0,0,216);
            			sc_pdf_set_y(32);
                        foreach ({bitacora} as $NM_ind => $Dados)
                        {  
            				$i = sc_pdf_get_y(); /*Returns the ordinate of the current position and asing to $i
            				if ($i > 249){
            					sc_pdf_add_page('P', 'Letter'); /*create new page*/
            					sc_pdf_image('BITACORA.png',0,0,216); /* i put a image for look better*/
            					$i = 32; /* this its the magic line. asign new valor to the ordinate position*/
            					
            				}
            				sc_pdf_set_y($i);
            				sc_pdf_print_sub_sel($cell_bitacora_id_usuario[$NM_ind]);
            				sc_pdf_set_y($i);
            				sc_pdf_set_x(140);
                                            sc_pdf_print_sub_sel($cell_bitacora_fecha[$NM_ind]);				
            				sc_pdf_set_y($i+10);
            				sc_pdf_print_sub_sel_mult($cell_bitacora_descripcion[$NM_ind], 4.23333333333);
                                            $j = sc_pdf_get_y();
            				sc_pdf_set_y($j+20);
                        }
            Last edited by GhoulRul; 07-16-2014, 01:39 PM.

            Comment

            Working...
            X