Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What's the Best Way To Create A Variable Column Report
Message
 
To
27/02/2008 20:42:55
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01297227
Message ID:
01297327
Views:
13
>I have a customer that would like a sales report formatted as follows. Product Lines as the columns and sales territories as the rows. The tricky part is they want to group the Product Lines by Manufacture and provide a column with the Manufacture totals per sales territory. I have provided a simple example below. What I can't figure out how to match the current BASIC report that provides this information. This report can list approximately five Product Lines per page. If there are six a second page is used and for the sixth and totals column. Then the report continues the process for the next manufacture. Any suggestions would be greatly appreciated. I'm really stuck here.
>
>Product_Line_1 Product_Line_2 Product_Line_3 Product_Line_4 Product_Total
>
>Territory1
>Territory2
>Territory3
>Territory4
>Territory5
>
>
>Jeff

Jeff,
I have found that the easiest way to create reports such as this is to create the entire report in a cursor first. Create your cursor with numeric fields to hold the numeric data and character fields to hold the final formatted data. Then do all the math, (totals / cross totals, etc) in the cursor. Using this you can even put final totals at the top of the 1st page.

Once you have all the numerics done you just then need to format the numbers and put them into character fields. Then you create a simple report layout that simply prints the formatted fields.
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform