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 biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Place Summary band at bottom of page 1

Status
Not open for further replies.

manpaul

Technical User
Jan 10, 2005
118
CA
I need to place the summary band at the bottom of the current page and make the page size the right length

Header
.
.
Detail
.
.
Group summary
eof()










Summary Band at bottom of page

Any ideas
 
Now I got it where I want, I need to only print it on the very last page. The report can be many pages.
 
As Stella says, make it a Page Footer and print it only on the condition EOF().

Jim
 
I tried print when eof() and it remove the line
in the print when command I put : EOF()

Now I am pulling data from three different tables and all of them should be at eof()

So am I missing the syntax for eof()?
 
I have tried to full qualify the eof("podet")
which is the file used in the detail line of the report
and in does not print

I have tried to set a variable on exit of the group footer which signals the last page and the variable does not get set
any ideas.
 

Instead of EOF(), try using system variables. For example, print only when _PAGENO=_PAGETOTAL.

I believe, you use VFP 9.0, right? Because I believe, _PAGETOTAL was introduced only around v.8 (_PAGENO was there for many years).

 
Stella

Thank you as I have been pulling my hair out trying to find a way to do this

All other methods were just not working

in my group band if it span over to a new page the eof() condition was meet and the page footer printed on both pages.
 

Glad it helped. Thanks for the star.

in my group band if it span over to a new page the eof() condition was meet and the page footer printed on both pages.
Well, try to think of one more condition to add to it, so it would fire only once.
Maybe I will think of one later or next week.

 

Well, I've got a thought. Not sure it would work, but worth a try.

In your calling program, create a public variable, say, TestVar and set its value, let it be 0. Define two functions that change the value of that variable inside it. Let one of them (SetTo0(), say) set TestVar to 0, and another one (SetTo1()) to 1.

In your report, put one field at the beginning of the Group Footer, another one at the end of the Group Footer. Make them invisible (set them to white-on-white). You can even put them where your regular fields are, and send to back, so they wouldn't take additional space, and your regular stuff would overlap them.

Put a call to SetTo1() in the expression of the field in the first one, call to SetTo0() in the second. I believe, UDFs are evaluated one by one, as they come in the report.

Now, put a condition in your Page Footer Print-When expression relying on that variable. Say, make it _PAGENO=_PAGETOTAL AND TestVar=0 (thus, making sure that printing of Group Footer is over).

See if it works.
 

As an addition,
the UDF could look something like this:

Code:
Function SetTo1
   TestVar=1
Return ""

This way, you don't even have to make the fields invisible, as there is nothing to print in it.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top