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: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Sytze de Boer Sent: 25 June 2008 12:03 To: [email protected] Subject: VFP9-reports 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 --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- [excessive quoting removed by server] _______________________________________________ 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.

