Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Groop-footer at bottom of page
Message
 
 
À
28/12/2001 02:35:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Divers
Thread ID:
00598553
Message ID:
00598788
Vues:
28
>>< snip >
>>
>>>2) How do I now how much pages a report contain.
>>
>>See Message #587096.
>>
>>< snip >
>
>Could this help me to know huw much pages a groop needs.
>
>As exit-procedure of each group I can fill a array with the group-id and the curent _pageno ? If I don't choose 'release variable on exit-report' I can acces this variable after I print the report to file.

Jimmy,

Unfortunately, there is no simple way to define a number of pages per group. However, there is a trick similar to the one, I used to insert a blank page if group ends on the odd page (See FoxTallk Feb 2000 and March 2000 articles by Cathy Pountney). The trick is: on Exit of group footer you would need to call some function, say, RememberGroupPageNo()

This code of this function would be something like:
local lnSelect
lnSelect=select()
if lFirstTime
   if not used('temptable')
      select 0
      create table temptable (GroupVal C(3), PageEnd I) && GroupVal is the value, which contains your group expression, so made it correct length and type
      index on GroupVal tag GroupVal 
   endif
   insert into temptable values(MyField, _pageno)
endif
    
select (m.lnSelect)
In the expression for Page 1 of 10 in Group11 you would put something like
"Page "+transform(_pageno)+" of "+iif(lFirstTime,"10",transform(TempTable.PageEnd))

You also would need a function in the Header like SetEnvir()
if not lFirstTime
   if not used('temptable')
     use temptable order GroupVal in 0
   endif 
    set relation to
    set relation to MyGroupField into TempTable additive
endif
You also would need private variable called lFirstTime. You set it to true, then run your report to a dummy file, then set it to false and you can run your report again.

I haven't thought this thoroughly, but this is just an idea, which may help you get started.
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