Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Page count problem using Memo Field Stretching in Report

Status
Not open for further replies.

foxuser

Programmer
May 23, 2000
11
US
I would like to reset page # to 1, for my each data grouping with following example, In report group detail, I have Memo field with stretch, which works fine, at the page footer I have for page#, ALLTRIM(STR(_PAGENO)). It will work fine if in data grouping I will uncheck Reset page # to 1 for each group, that means it will not reset page # for new group. BUT if check reset page # to 1 for each group, on second page it shows the page count as page 1 (detail is of page 2). But if you uncheck reset page # to 1 for each group it will print page #2 as it suppose to but than for new group of course it does not reset page # to 1.

I would appreciate any suggestion.

Thank you

naushad@thessi.com
 
This problem probably could be solved by using report variables based on the page number. Following is my suggestion only, not sure it will work... Note that variables should be defined in exact order as below

Variable//in.value//expression
IsGroupNew//.T.//OldGroup<>GroupField
IsPageNew//.T.//_PageNo<>OldPageNo

RealPageNo//1//iif(IsGroupNew,1,RealPageNo+iif(IsPageNew,1,0))

OldGroup//Groupfield//Groupfield
OldPageNo//_PageNo//_PageNo

The idea is - manual counting of pages in the variable (variable RealPageNo will be increased by 1 each time page changed, but dropped to 1 when new group starts) Use RealPageNo variable as page number.

Hope this helped. If you will try this, let us know if this helps.

Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Thanks but above solution does not work, because calculation of variables is done once in stretch mode, when data is stretch to next page its still uses old value.
 
Problem solved, I had Title Band Check & New page uncheck, some how foxpro cant count the page # correctly. BUT if you take title band out or also check new page it will count page # correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top