Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Summary report of data group
Message
From
02/03/2005 14:28:07
 
 
To
02/03/2005 03:54:40
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Miscellaneous
Thread ID:
00991871
Message ID:
00992117
Views:
25
If the products are fixed, then you can create report variables that will sum the qty for each product and display those values in the summary. I don't recommend that though because what if they change later.

If the products change, then create a temporary table or use a sql select and modify the table created to store the values. Step through the table before you run the report and you can sum for that product type as you go along. an easy way to do that is to create a two column array at the beginning of the process to store the products and quantities. As you step through the table, store the product if it hasn't been added to the array yet and add the quantity. When you have reached the end of the table then step through the array you created and add records to the end of the table to store the product id and totals. Add a field also to be used in the report's printwhen condition like a logical field calleds ltotals and then for each of the array items set ltotals = .T., add the product and the qty and then print those records in the report last using the printwhen ltotals = .T. at the end of the report. This can be done in any version of VFP.

There is probably more ways to do this but this is off the top of my head...

>Dear all,
>is it impossible to make report with summary data groupping,
>for example i have report with invoice_no,price,product
>then i want to show total sales for product in summary page
>(data product has grouping from detail report).
>
>Please help me ?? I want to display in my report
>
> -----------------------------------
> invoice | qty | product |
> ----------------------------------
> 001 | 1 | A |
> 002 | 5 | B |
> 003 | 5 | E |
> 004 | 6 | A |
> .........
> ---------------------------------
> SUM | 17 | |
> ----------------------------------
> Summary of Report
> PRODUCT A = 7
> PRODUCT B = 5
> PRODUCT E = 5
>
>****** End of Report **************
>
>
>Best Regard,
>
>
>Leosan
.·*´¨)
.·`TCH
(..·*

010000110101001101101000011000010111001001110000010011110111001001000010011101010111001101110100
"When the debate is lost, slander becomes the tool of the loser." - Socrates
Vita contingit, Vive cum eo. (Life Happens, Live With it.)
"Life is not measured by the number of breaths we take, but by the moments that take our breath away." -- author unknown
"De omnibus dubitandum"
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform