>>Just found out you can call the VFP report wizard in AUTOREPORT mode with an object parameter and it creates an FRX on the fly for you in the chosen style, perhaps your own. I have been looking for this for quicker development but did not realize it was under my nose. All you have to do is create a cursor with fields named as you want the columns titled.
>>
>>More generally, all wizards can be called with parameters, and it may be a worthwhile project to document them here.
>>
>That sounds interesting. However, I don't understand "object parameter" in this context. What are you passing - an object, or the name of the cursor?
You actually pass an object whose properties are the parameters. This is the kind of code you need to use. Look at the wizard source for more details.
oParametros = NEWOBJECT('line')
oParametros.AddProperty('cWizTable','')
oParametros.AddProperty('cWizAlias','')
oParametros.AddProperty('lBlankForm',.F.)
oParametros.AddProperty('aWizFields','')
oParametros.AddProperty('cStyleFile','Styles\Style3H.frx')
oParametros.AddProperty('aWizSorts','')
oParametros.AddProperty('lSortAscend',.T.)
oParametros.AddProperty('lTruncate',.F.)
oParametros.AddProperty('cOutFile','rpt'+ALIAS()+'.FRX')
oParametros.AddProperty('nLayout',1)
oParametros.AddProperty('nColumns',1)
oParametros.AddProperty('lLandscape',.T.)
oParametros.AddProperty('nWizAction',GO_MODIFY)
oParametros.AddProperty('cWizTitle',ALIAS())
DO WzReport WITH '','AUTOREPORT',,oParametros