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

_VFP.SetVar, Multiple Variables

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
Is there a way to have _VFP.SetVar set the value of more than one variable in the footer of a group?

Auguy
Northwest Ohio
 
No, and to be perfectly honest I can't think of a reason to use Setvar() pretty much anywhere from *inside* VFP. It's intended for use when automating VFP from *outside*.

When you say "in the footer of a group" are you talking about a report?

Why not spell out what you're trying to do, instead of how, and you'll no doubt get no end of suggestions.
 
Sorry, I was referring to a group on a report. I was trying to sum several columns, like an invoice total that would be incorrect when the report includes all of the detail invoice records and therefore would add the invoice total many times in a calculated sum in a group footer band. I have re-worked my report variables to give me the correct sums.

Auguy
Northwest Ohio
 
FWIW, I've handled the kind of task you're talking about with a pair of report variables. One tracks the group and one tracks the total. I wrote about it in the March '04 issue of FoxPro Advisor, so if you have that, you can take a look.

Tamar
 
LOL, thanks Tamar, that is exactly where I got the work-around. I found a reference to it online, but I have the advisor copy too. You've probably answered that question a thousand times.

Auguy
Northwest Ohio
 
Maybe not a thousand, but a lot. It's a pretty common question, and while the answer makes sense when you know it, it's not straightforward.

Tamar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top