Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with _pageno
Message
From
07/11/2001 11:43:59
 
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00578137
Message ID:
00578552
Views:
22
Paul,

Why are you trying to reset _pageno to zero? According to your original question, _pageno is already being reset to zero too often.

Dragan's idea is to increment (in a function) another variable, called nPages.

Instead of printing _pageno at the bottom of each page, you can put _pageNo+npages in the expression.

His idea should work...

>The reason I was getting the error is because _pageno must be between 1 and 32,xxx.
>
>I cannot for the life of me get this to work. I set the value of _pageno to 1 and then I check it in the debugger and it is set to 1 however, the report still prints page 3. I have tried to send _pageno as a parameter by reference. It doesn't like the "@" in front of "_pageno". I've tried everything I can think of here.
>
>Any help would be greatly appreciated.
>
>Paul
>
>>Hi Dragan,
>>
>>I have changed the "on exit" of the location group footer to call a proc in a prg that is available. In the proc I have one line of code. _pageno = 0. When I run it I get an error "Expression evaluated to an illegal value".
>>
>>Paul
>>
>>>>I have an frx with 5 data groupings. Data groupings 1 and 2 have the option selected that starts on a new page. Data grouping 1 has the option selected to reset the page numbers.
>>>>
>>>>The problem is that data grouping 2 also resets the pages even thought I don't have it checked.
>>>>
>>>>IOW, grouping 1 = store location, grouping 2 = categories. Everytime the category changes I want it to start on a new page but not reset the _pageno. But once we switch to a new store location I want it to begin on a new page and start with Page 1 again.
>>>>
>>>>Everything starts on a new page correctly..its just that my page# is always 1.
>>>>
>>>>I have 2 different reports where I am having the same problem. I did a lot of searching on this subject and haven't found anything...so I assume I am doing something stupid here, but I can't figure out what it is..
>>>
>>>Here's a cheezy and dirty trick, but might work. Create a report variable nPages, set it to zero, calculate nothing. Write a function, name it, p.e. StoreNPages.prg:
>>>
nPages=nPages+_pageno
>>>(yes, a one-liner), and call that function on exit in category group. Instead of _pageno, print nPages+_pageno. That's it.
>>>
>>>Or if you are having the oposite problem, that the _pageno is not resetting, and you need it reset, this can work as well, even simpler. Forget the report variable, and just have a function which will set _pageno=0 each time your group exits.
Steve Gibson
Previous
Reply
Map
View

Click here to load this message in the networking platform