>>>No, it would expect to find a field called lcfieldname in your table. Instead use:
>>>
>>>x = eval('myTable.' + lcFieldName)
>>>
>>>
>>>>I'm in the process of trying to use a xtab query in a report. The query results are too large for a VFP report. Can I get a field value like this:
>>>>lcFieldname = FIELD(lcFNum)
>>>>
>>>>myTable.lcFieldname = x
>>>>
>>>>Will VFP recognize the variable as a field name??
>>>>
>>>>(Boss doesn't want to use Crystal Reports)
>>
>>Thanx Anyhow Ken,
>>
>>It won't accept the eval's
>
>Perry, you can always use UDF as generic solution, e.g. you create report field with gettablefield() as field expression, and
>Function gettablefield
>Do case
>Case oApp.reporttype=1
>return table1.field1
>Case oApp.reporttype=2
>return table5.field4
>....
>Endcase
>Endfunc
>
>and why you complain so much about your boss? As far as I see from your replies he/she is great.
No complaints, just trying to minimize responses where people suggest 3rd party software. Here at CAE it's live or die by VFP or VC++
Perry E. Chrzanowski
Programmer/Analyst
Saturn (Solutions) Inc.