I like Dave's idea, but there is another option. Create a variable for each
changing field, and set the "Value to store:" to 
   Eval(Field(#))   

You'll be able to use the variables in the layout and easily determine what
they mean.

Tracy

-----Original Message-----
From: Dave Crozier
Sent: Wednesday, June 25, 2008 7:37 AM

Sytze,
Take the easy approach, prior to the report generate a SQL statement
programmatically which maps the variable field names on the left of the "AS"
into fixed field name on the right hand side, then use this as an input
table into your report.

Select ;
  <Variable Field name> as Field1, ;
  ...
Into cursor curReport


Dave Crozier

-----Original Message-----
From: Sytze de Boer
Sent: 25 June 2008 12:03

Sorry for such a basic foxpro issue,
Please help me out

I have a table where the 1st column is a constant called CODE, but the next
12 columns will not always be called the same.
e.g., Depending on the period of the report, the 2nd column could be called
C_2006_01 or C_2008_01 (3rd column same, etc)

This is not causing me any issues (in fact this is how I want it) But it
becomes an issue when I want to print a report where I'm stuck for
expressions
>From the command prompt I can say repfld2=field(2)
It correctly returns "C_2006_01"
When I say ?&repfld2 , it returns the correct value (say $1000) But a report
won't accept an expression of &repfld2

Any suggestions are welcome

--
Regards
Sytze de Boer
Kiss Systems
Ph: 64-7-8391670, Mob:021 937611, Skype: kissman2 www.kiss.co.nz



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to