General information
Category:
Reports & Report designer
>>>I have a table that contains month, year, province, and sales total. The enduser requests the layout of the summary report with months across the column and the province on each row. Summation totals for entire year at the bottom of each column and summation totals of each month at the end of each row. It's very easy to do if it is done in Excel/Lotus. I am having trouble building this kind of report in the VFP report generator.
>>>
>>>E.G.:
>>>
>>>Prov J F M A Total
>>>on 0 23 20 33 76
>>>bc 1 2 3 0 6
>>>
>>>Total 1 25 23 33 82
>>>
>>>Thank you
>>
>>What you want is called a cross tab...and it is quite easy to create. You can use GENXTAB.PRG that ships with FoxPro to do most of the work. I suggest building a query in the query designer and telling it to generate a cross tab, then look at the SQL code to see how it's done. Then cut and paste the code to your program.
>>
>>Craig
>
>
>Were you finally able to do it, as I also want to make similar kind of report and problem is cross tab only supports 3 fields, whereas my report is having more then 13 fields
You can modify GenXTab.prg to meet your needs.
Vlad
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only