Jim and Bernard thanks for your help!

Godzilla

*> **> Here is the description of my table*

> >

> > Year Month Values

> > 1951 January 319

> > 1951 February 898

> > 1951 March 765

> > 1951 April 654

> > 1951 May 343

> > 1951 June 768

> > 1951 July 900

> > 1951 August 766

> > 1951 September 765

> > 1951 October 898

> > 1951 November 876

> > 1951 December 321

> > 1952 January 319

> > 1952 February 898

> > 1952 March 765

> > 1952 April 654

> > 1952 May 343

> > 1952 June 768

> > 1952 July 900

> > 1952 August 766

> > 1952 September 765

> > 1952 October 898

> > 1952 November 876

> > 1952 December 321

> > 1953 January 319

> > 1953 February 898

> > 1953 March 765

> > 1953 April 654

> > 1953 May 343

> > 1953 June 768

> > 1953 July 900

> > 1953 August 766

> > 1953 September 765

> > 1953 October 898

> > 1953 November 876

> > 1953 December 321

> > .

> > .

> > .

> > .

> > .

> >

> > Another layout of the table is that, Month is the first column and the Year column the second.

> >

> > The number of clumns is not known in advance, as the years would determine that.

> >

> > Godzilla

> >

> >

> > *> **> Dear Experts,*

> > > >

> > > > I need to display a report based on the outcome of cross tabbing a table, my problem here is that, how can I generate the Column headers for the report since I don't know them in advance?

> > > >

> > > > Godzilla

> > >

> > >

> > >

> > > One way is you can use a "Field" object instead of a "Label" object for your headers.Then just enter the expression in each one:

> > >

> > > FIELD(1) FIELD(2) FIELD(3) etc.

> > >

> > > When run the expression will be evaluated and whatever you have as field names will appear in the "Field" object.

>

>

> Which is why I said to use the FIELD() function. The FIELD() function is a function in VFP:

>

>

> *Returns the name of a field, referenced by number, in a table.*

>

> FIELD(nFieldNumber | cFieldName [, nWorkArea | cTableAlias [, nFlags]])

>

>

> So once you make a cross tab of your table your table will have field names which you don't know at design time. So you dont use a label on your report and use instead a fieldobject, setting its values to FIELD(1), FIELD(2) etc.

>

>

>

>

> When you run the report the expression FIELD(1) will be evaluated and will display the current field name. See the image below.

>

>

>