See https://www.screencast.com/t/8bj9GNQk for what's happening. Outermost group is CUST_ID. In Report Writer, Data Grouping tab, I've selected Group starts on NEW PAGE NUMBER 1 (the last radio option). I must admit I've never used this option before; most of my reports are always the New Line or New Page option.
I'm using this expression in my footer to produce what you see: "Page " + allt(str(_pageno)) + " of " + allt(str( _pagetotal))
Obviously the _pagetotal internal variable is not getting set correctly.
Ideas on how to fix? tia! --Mike
Mike,
I haven't looked at the video, just a WAG here...
Apply the patches and retest.
Bill Anderson
On Sat, Mar 25, 2017 at 8:39 PM, < mbsoftwaresolutions@mbsoftwaresolutions.com> wrote:
See https://www.screencast.com/t/8bj9GNQk for what's happening. Outermost group is CUST_ID. In Report Writer, Data Grouping tab, I've selected Group starts on NEW PAGE NUMBER 1 (the last radio option). I must admit I've never used this option before; most of my reports are always the New Line or New Page option.
I'm using this expression in my footer to produce what you see: "Page "
- allt(str(_pageno)) + " of " + allt(str( _pagetotal))
Obviously the _pagetotal internal variable is not getting set correctly.
Ideas on how to fix? tia! --Mike
[excessive quoting removed by server]
On 2017-03-27 11:49, Bill Anderson wrote:
Mike,
I haven't looked at the video, just a WAG here...
Apply the patches and retest.
Bill Anderson
Hi Bill!
Went there, clicked the link to appply the hot fix and got:
Microsoft Developer Network > Samples > The page does not exist The page does not exist Sorry, the page you requested was not found. If you would like to contact us regarding this, please click here. Return to the Samples Gallery home page.
ugh!
Mike - I believe this is a VERY Common problem and has been covered here on the forum a number of times over the years. As I know I had the problem in the past as well. I don't think VFP can truly generate the total page count until AFTER the report is completed. So - what people have suggested in the past - which I think I did once - is to run the report Twice. The 1st time around it will generate the total # of pages. Then you capture that value and then USE it when printing the actual report the 2nd time. Maybe something like the 1st time around the report is generated but goes to a PDF file or something like that. Although - that part is just a WAG on my part...
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Saturday, March 25, 2017 11:39 PM To: profoxtech@leafe.com Subject: VFP9SP2 report error with _pagetotal variable
See https://www.screencast.com/t/8bj9GNQk for what's happening. Outermost group is CUST_ID. In Report Writer, Data Grouping tab, I've selected Group starts on NEW PAGE NUMBER 1 (the last radio option). I must admit I've never used this option before; most of my reports are always the New Line or New Page option.
I'm using this expression in my footer to produce what you see: "Page " + allt(str(_pageno)) + " of " + allt(str( _pagetotal))
Obviously the _pagetotal internal variable is not getting set correctly.
Ideas on how to fix? tia! --Mike
[excessive quoting removed by server]
How do you have REPORTBEHAVIOR set?
--
rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Kurt Wendt Sent: Monday, March 27, 2017 1:07 PM To: profoxtech@leafe.com Subject: RE: VFP9SP2 report error with _pagetotal variable
Mike - I believe this is a VERY Common problem and has been covered here on the forum a number of times over the years. As I know I had the problem in the past as well. I don't think VFP can truly generate the total page count until AFTER the report is completed. So - what people have suggested in the past - which I think I did once - is to run the report Twice. The 1st time around it will generate the total # of pages. Then you capture that value and then USE it when printing the actual report the 2nd time. Maybe something like the 1st time around the report is generated but goes to a PDF file or something like that. Although - that part is just a WAG on my part...
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Saturday, March 25, 2017 11:39 PM To: profoxtech@leafe.com Subject: VFP9SP2 report error with _pagetotal variable
See https://www.screencast.com/t/8bj9GNQk for what's happening. Outermost group is CUST_ID. In Report Writer, Data Grouping tab, I've selected Group starts on NEW PAGE NUMBER 1 (the last radio option). I must admit I've never used this option before; most of my reports are always the New Line or New Page option.
I'm using this expression in my footer to produce what you see: "Page " + allt(str(_pageno)) + " of " + allt(str( _pagetotal))
Obviously the _pagetotal internal variable is not getting set correctly.
Ideas on how to fix? tia! --Mike
[excessive quoting removed by server]
The MSDN suggests your string to print it is too complicated to parse and recognize that _PAGETOTAL is being invoked, and to force VFP to run the report in two-pass mode. The IIF() near the end of the article should resolve:
https://msdn.microsoft.com/en-us/library/aa977060(v=vs.71).aspx
HWP's What's New in VFP8 also has some good suggestions.
On Mon, Mar 27, 2017 at 1:10 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-03-27 13:10, Richard Kaye wrote:
How do you have REPORTBEHAVIOR set?
I tried it with 80 and 90, both. Same problem.
[excessive quoting removed by server]
[Page ]+ALLTRIM(TRANSFORM(_pageno))+IIF(_pagetotal>1,[ of ]+ALLTRIM(TRANSFORM(_pagetotal)),[])
This is the expression I use. I can't recall seeing it misbehave.
--
rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: Monday, March 27, 2017 1:21 PM To: profoxtech@leafe.com Subject: Re: VFP9SP2 report error with _pagetotal variable
The MSDN suggests your string to print it is too complicated to parse and recognize that _PAGETOTAL is being invoked, and to force VFP to run the report in two-pass mode. The IIF() near the end of the article should resolve:
https://msdn.microsoft.com/en-us/library/aa977060(v=vs.71).aspx
HWP's What's New in VFP8 also has some good suggestions.
On Mon, Mar 27, 2017 at 1:10 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-03-27 13:10, Richard Kaye wrote:
How do you have REPORTBEHAVIOR set?
I tried it with 80 and 90, both. Same problem.
[excessive quoting removed by server]
The problem as I see it - is how can VFP predict full length of the report at the start? Many things are dependent on the data - even to the point of things like starting a new grouping on a new page - which could cause a gap at a bottom of a page. Unless, of course, VFP can internally run the report without you seeing it - in like a 1st pass - so that it can properly determine total # of pages! Anyway - those are my thoughts on the matter...
Although - truthfully - I have even done much in the way of reports for years. The one system I worked on here had "reports" - but, they were ALL just Excel files. The other system I still currently support - it has reports - but, they just work and have not needed ANY Modifications in the past nearly 2 years since I have been support this system.
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Monday, March 27, 2017 1:24 PM To: profoxtech@leafe.com Subject: RE: VFP9SP2 report error with _pagetotal variable
[Page ]+ALLTRIM(TRANSFORM(_pageno))+IIF(_pagetotal>1,[ of ]+ALLTRIM(TRANSFORM(_pagetotal)),[])
This is the expression I use. I can't recall seeing it misbehave.
--
rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: Monday, March 27, 2017 1:21 PM To: profoxtech@leafe.com Subject: Re: VFP9SP2 report error with _pagetotal variable
The MSDN suggests your string to print it is too complicated to parse and recognize that _PAGETOTAL is being invoked, and to force VFP to run the report in two-pass mode. The IIF() near the end of the article should resolve:
https://msdn.microsoft.com/en-us/library/aa977060(v=vs.71).aspx
HWP's What's New in VFP8 also has some good suggestions.
On Mon, Mar 27, 2017 at 1:10 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-03-27 13:10, Richard Kaye wrote:
How do you have REPORTBEHAVIOR set?
I tried it with 80 and 90, both. Same problem.
[excessive quoting removed by server]
Kurt:
That's exactly what _PAGETOTAL does: it triggers the reporting engine to run the report one time invisibly and populate the _PAGETOTAL variable. Of course, this can wreak havoc if you've snuck a couple of UDFs in the snippets!
On Mon, Mar 27, 2017 at 1:37 PM, Kurt Wendt Kurt_Wendt@globetax.com wrote:
The problem as I see it - is how can VFP predict full length of the report at the start? Many things are dependent on the data - even to the point of things like starting a new grouping on a new page - which could cause a gap at a bottom of a page. Unless, of course, VFP can internally run the report without you seeing it - in like a 1st pass - so that it can properly determine total # of pages! Anyway - those are my thoughts on the matter...
Although - truthfully - I have even done much in the way of reports for years. The one system I worked on here had "reports" - but, they were ALL just Excel files. The other system I still currently support - it has reports - but, they just work and have not needed ANY Modifications in the past nearly 2 years since I have been support this system.
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Richard Kaye Sent: Monday, March 27, 2017 1:24 PM To: profoxtech@leafe.com Subject: RE: VFP9SP2 report error with _pagetotal variable
[Page ]+ALLTRIM(TRANSFORM(_pageno))+IIF(_pagetotal>1,[ of ]+ALLTRIM(TRANSFORM(_pagetotal)),[])
This is the expression I use. I can't recall seeing it misbehave.
--
rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Ted Roche Sent: Monday, March 27, 2017 1:21 PM To: profoxtech@leafe.com Subject: Re: VFP9SP2 report error with _pagetotal variable
The MSDN suggests your string to print it is too complicated to parse and recognize that _PAGETOTAL is being invoked, and to force VFP to run the report in two-pass mode. The IIF() near the end of the article should resolve:
https://msdn.microsoft.com/en-us/library/aa977060(v=vs.71).aspx
HWP's What's New in VFP8 also has some good suggestions.
On Mon, Mar 27, 2017 at 1:10 PM, mbsoftwaresolutions@mbsoftwaresolutions.com wrote:
On 2017-03-27 13:10, Richard Kaye wrote:
How do you have REPORTBEHAVIOR set?
I tried it with 80 and 90, both. Same problem.
[excessive quoting removed by server]
On 2017-03-27 13:23, Richard Kaye wrote:
[Page ]+ALLTRIM(TRANSFORM(_pageno))+IIF(_pagetotal>1,[ of ]+ALLTRIM(TRANSFORM(_pagetotal)),[])
This is the expression I use. I can't recall seeing it misbehave.
--
rk
Hi Richard,
This only misbehaves when you select that the group starts on a NEW Page NUMBER 1 (4th radio button). Otherwise, it's fine. I've used what you've got above for years, but never chose this 4th radio option kind of report before.
This does sound very familiar. Do you have a copy of Cathy Poutney's RW book? Maybe it's mentioned in there?
--
rk -----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Kurt Wendt Sent: Monday, March 27, 2017 1:07 PM To: profoxtech@leafe.com Subject: RE: VFP9SP2 report error with _pagetotal variable
Mike - I believe this is a VERY Common problem and has been covered here on the forum a number of times over the years. As I know I had the problem in the past as well. I don't think VFP can truly generate the total page count until AFTER the report is completed. So - what people have suggested in the past - which I think I did once - is to run the report Twice. The 1st time around it will generate the total # of pages. Then you capture that value and then USE it when printing the actual report the 2nd time. Maybe something like the 1st time around the report is generated but goes to a PDF file or something like that. Although - that part is just a WAG on my part...
Regards, Kurt Wendt Senior Systems Analyst
Tel. +1-212-747-9100 www.GlobeTax.com
-----Original Message----- From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of mbsoftwaresolutions@mbsoftwaresolutions.com Sent: Saturday, March 25, 2017 11:39 PM To: profoxtech@leafe.com Subject: VFP9SP2 report error with _pagetotal variable
See https://www.screencast.com/t/8bj9GNQk for what's happening. Outermost group is CUST_ID. In Report Writer, Data Grouping tab, I've selected Group starts on NEW PAGE NUMBER 1 (the last radio option). I must admit I've never used this option before; most of my reports are always the New Line or New Page option.
I'm using this expression in my footer to produce what you see: "Page " + allt(str(_pageno)) + " of " + allt(str( _pagetotal))
Obviously the _pagetotal internal variable is not getting set correctly.
Ideas on how to fix? tia! --Mike
[excessive quoting removed by server]