>I have managed to produce a cross-tab using _genxtab. The problem arises when I want to produce a report which does not have a fixed number of columns. Example a range of dates selected by the user. I would like to produce this report in run time. Any suggestions how this should be done?
>
>Thanks in advance for any answers.
>
>Sanjay
Whe you run cross-tab in code (DO Vfpxtab ...) you receive a cursor. This cursor will really have flexible number of fields (as many as number of unique keys in source), but you may analyze this cursor using e.g. FCOUNT(),FIELD() etc. and make structure uniformed by ALTER TABLE ADD/DROP column, i.e. everything can be done programmatically. When cursor is ready you may use it to run REPORT FORM ...
Edward Pikman
Independent Consultant