Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dead looping report....
Message
De
30/12/1999 03:00:34
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Dead looping report....
Divers
Thread ID:
00310266
Message ID:
00310266
Vues:
41
My situation now is, i want to print out a report, but each of the report is defined to only contain 10 item, if more than 10 , the rest will go on to the next report. My code is:
SELECT REPORT_C2
REC = RECCOUNT()
TO_PAGENO = 0
IF REC > 11
DO WHILE (REC > 11 )
REC = REC - 10
TO_PAGENO = TO_PAGENO + 1
IF REC > 0 AND REC < 11
TO_PAGENO = TO_PAGENO + 1
ENDIF

ENDDO
ELSE
TO_PAGENO = 1
ENDIF
FM_PAGENO = 1

WAIT WINDOW "Printing......." TIMEOUT 3
FOR PN = FM_PAGENO TO TO_PAGENO
MESSAGEBOX(STR(PN),0,"TEST")
IF PN = 1
NITEM = 0
TPAGENO = PN
REPORT FORM SOREPORT TO PRINTER
ELSE
NITEM = 10 * (PN - 1)
TPAGENO = PN
REPORT FORM SOREPORT TO PRINTER
ENDIF
ENDFOR
ELSE
MESSAGEBOX("SO No. Not Found!", 0 + 48,"System")
ENDIF

RETURN

* report_c2 is a cursor contain all the record information for my report and fm_pageno & to_pageno contain the number of page for the "for loop" to print servals report.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform