PRINT A REPORT 3 TIMES

Posted by rogeliolt on 17-Jul-2012 11:03

hi people... I need your help... I work with progress character mode... I need print a format three times in the same page, but I don't kwon how I can do it.

I try with "do while", using a index integer ...

ex.:

do while i = 3:

  ouput straeam value_out to value ("xxx.txt").

    for each custom where custom.city = "MEXICO"

                            no-lock:

        nom_cust = custom.c_nom.

        add_cust = custom.c_addres.

    end.

    put stream value_out

       "MY FORMAT"                  skip

       "FORMAT CUSTOMER"     skip

       "NAME CUSTOMER: "       skip

       nom_cust                          skip

       "ADDRESS CUSTOMER:"  skip

       "add_cust                          skip.

    output stream value_out close.

end.

I can view the report in thes way...

MY FORMAT                                                  FORMAT CUSTOMER

NAME CUSTOMER:  "nom_cust"                     NAME CUSTOMER:  "nom_cust"

ADDRESS CUSTOMER: add_cust                   ADDRESS CUSTOMER: add_cust

but I need view this report again in the same page, example:

MY FORMAT                                                  FORMAT CUSTOMER

NAME CUSTOMER:  "nom_cust"                     NAME CUSTOMER:  "nom_cust"

ADDRESS CUSTOMER: add_cust                   ADDRESS CUSTOMER: add_cust

MY FORMAT                                                  FORMAT CUSTOMER

NAME CUSTOMER:  "nom_cust"                     NAME CUSTOMER:  "nom_cust"

ADDRESS CUSTOMER: add_cust                   ADDRESS CUSTOMER: add_cust

MY FORMAT                                                  FORMAT CUSTOMER

NAME CUSTOMER:  "nom_cust"                     NAME CUSTOMER:  "nom_cust"

ADDRESS CUSTOMER: add_cust                   ADDRESS CUSTOMER: add_cust

Please I need your help...

All Replies

Posted by Tim Kuehn on 17-Jul-2012 14:14

Move the "output" statements outside of your "DO" loop.

Posted by rogeliolt on 17-Jul-2012 14:54

u have reason... thanks a lot.

This thread is closed