Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to count the total page number of a group in a Repor
Message
 
 
À
20/09/2001 21:05:04
Ransome So
Ransome's Workshop
Hong Kong, Hong Kong
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00559063
Message ID:
00559065
Vues:
14
Dear So Ransome,

Yes, it's possible, but would require printing this report twice. The first time you can print it to a dummy file (and delete this file afterwards) and the second and other times would be the real one. In the procedure, which invokes your report, you can create a cursor with the following fields: GroupID TotalPages.
In the report Group Footer you can use either on exit or place a calculated field with the expression GroupTotalPage(). In this function you would insert records into your cursor GroupID _PageNo (if the record with this group already exists, you can update TotalPages field). When you would run your report the second time, you should set relation to your cursor based on GroupID field and in the footer you would put this expression:
"Page "+transform(_pageno)+ ;
  iif(reccount('myTotalPagesCursor')>0, ;
  " of "+ transform(myTotalPagesCursor.TotalPages),"")
This is an idea, which I just now invented, so it's not tested, but it should turn you in the right direction.

Best wishes,
Nadya

>Dear all,
>
>In a report I divide the data into groups such as:
>
>select * from MyDBF group by FieldA into cursor FileToBeReport
>report form MyReport to print.....
>
>where the dataenvironment for MyReport is the cursor FileToBeReport generated before.
>
>In the report designer I set the report start the page number for every FieldA groups.
>
>If say, In my report FieldA have 3 instances say A, B, C, After generation of FileToBeReport, say, A need 3 pages, B need 1 pages and C need 2 pages.
>
>Can I place a printing field as 'Page 1 of 3, Page 2 of 3 ....' on the A pages, 'Page 1 of 1' for B, and 'Page 1 of 2....' on C pages??
>
>Is it impossible? if it works, how to do that??
>
>
>With regards,
>
>
>Ransome
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform