>Mark,
>
>>oReport.formulafields(11).Text = lnCloseAssetBaseMonth
>>Can I use formula's name instead of 11?
>
>>FormulaFieldDefinitions is unknown name.
>>Mark
>
>Yes, My fault. Accoring the documentation (Developer.hlp), you can use:
>oReport.formulafields("WhatEverName").Text= cYourFormula.
>
>B.t.w., Do you need to change the formula, or do you simply want to pass a variable to the report. Then it might be better to use parameterfields. for example:
>
>
>WITH oReport.ParameterFields
> FOR nT= 1 TO .Count
> cName=.Item(nT).ParameterFieldName
> IF TYPE(cName) # "U"
> .item(nT).SetCurrentValue(EVAL(cName))
> ENDIF
> ENDFOR
>ENDWITH
>
>In this way you pass variables defined in VFP to CR, if the variables in CR have the same name.
>
>Walter,
Try it.