Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 To: Puji Anto
  Where is Puji Anto?
 Malang
 Indonesia
 Puji Anto
 Tags
Subject: RE: SUM data at Detail Report
Thread ID: 416060 Message ID: 416068 # Views: 46 # Ratings: 1
Version: Visual FoxPro 9 SP2 Category: Reports and Printers
Date: Saturday, December 20, 2014 1:30:25 PM         
   


> Dear Foxers,
>
> I get a trouble when make some report.
> I want to place SUM data at Detail Report.
>
> Let's the pict explain all of that.
> Image and video hosting by TinyPic
>
> Carilah Ilmu Walau Harus Ke Negeri Seberang

If VFP's report sums the group detail then the sum doesn't exist completed until you get to the bottom of the group.
One thing you can do is calculate the sum for each group in advance in a query and look it up at any time in the report:

SELECT groupid, SUM(amount) sumamt FROM ReportData GROUP BY groupid INTO CURSOR Tempsums
SELECT reportdata
REPORT FORM .... 


In the report you can have a textbox in the group header, or the detail or footer bands with a expression like this:
  LOOKUP(Tempsums.sumamt, Reportdata.groupid, 'Tempsums.groupid' ) 


-Anders

ENTIRE THREAD

SUM data at Detail Report Posted by Puji Anto @ 12/20/2014 5:48:37 AM
RE: SUM data at Detail Report Posted by Anders Altberg @ 12/20/2014 1:30:25 PM