This little-known function can be used to set variables in situations where you can't execute a command but you can call a function. A perfect example of when to use this is in the Report Designer. I use it all the time in the OnEntry and OnExit expressions of the various bands. For example, in the OnExit expression of a Group Footer, you can use _VFP.SetVar('rnRecordCount', 0) to clear the value of the rnRecordCount variable. Or you can use _VFP.SetVar('rnCountDataGroups', rnCountDataGroups+1) to increase a variable that tracks the number of data groups processed.