>How can I create a report from code, like wizard does, in order
>to list data generated from different selects.
>For example.
>Select f1,f2,sum(f3),max(f4) from t1 into cursor c1
>f1:C(25) f2:D f3:N(10,0) f4:N(3,3)
>The program should be intelligent enough to take data types
>and modify a .frx template with minimum registers, and
>append new registers matching those fields.
>
>Troubles I find:
>Give the size and position of each field
>When there is grouping information, how to locate the fields
>in each band,
>and so on...
>
>Any help would be appreciated
Ramon,
Any alias could be used to create a quick report :
Select * from myTable into cursor myCursor
create report myReport from alias() column
modify report myReport
report form myReport preview
Grouping is a little harder to implement. You could insert precalculated rows into cursor to mimic grouping (not a true grouping all in detail band but seems as if there is grouping).
You have other options to hack frx, use tools like genrepox, crystal reports, foxfire, reporting to word, excel etc. In excel you could use pivot tables to create summary data info :)
Cetin