Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number of Page
Message
 
À
28/11/2001 13:26:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00587093
Message ID:
00764713
Vues:
34
Hello Marc

if you don't have a memo field in your report it's easy just do the math ;
how many records fit on the first page and how many fit on every page after that and whats the total number of records being printed

here is some sample code from one of my apps print routine
PNTotalP = 0 && total pages
ln_total = 0 && local total during adding
ll_again = .T.
DO CASE
&& I sql'ed the table for the report and _tally returns the number of records
&& my report holds 6 records on the first page and 8 on the rest
	CASE _TALLY <= 6 
		PNTotalP = 1
		ll_again = .F.
	CASE _TALLY >6
		PNTotalP = 1
		ln_total = _TALLY - 6  && This will give us the remaining records to count.

		DO WHILE ll_again && More than 7 records exist on the order.
			IF ln_total > 8
				PNTotalP = PNTotalP + 1
				ln_total = ln_total - 8
			ENDIF
			IF ln_total < 8  AND ln_total > 0 && If less that 7 records exist on the order.
				PNTotalP = PNTotalP+1
				ll_again  = .F.
			ENDIF
		ENDDO
ENDCASE
I hope you can figure this out it will cut your printing time in half versus printing a report twice

>I put this code on a field and it does'nt work.
>"Page : " + alltrim(STR(_pageno)) + " of " + alltrim(STR(_pbpage))
>
>ex:
>Page 1 = Page 1 of 1
>Page 2 = Page 2 of 1
>Page 3 = Page 3 of 1
>...
Stephen McLaughlin
"Sexy Steve Valenteno", "Blastmaster"
stephenmclaughlin@gmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform