Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Patrick Danso
  Where is Patrick Danso?
 Accra
 Ghana
 Patrick Danso
 To: Tamar Granor
  Where is Tamar Granor?
 Elkins Park
 Pennsylvania - United States
 Tamar Granor
 Tags
Subject: RE: How to Group Data on Report
Thread ID: 344990 Message ID: 344994 # Views: 31 # Ratings: 0
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Wednesday, May 16, 2012 10:49:36 PM         
   


> > Hi Friends,
> > I have created a view called V_Loansdisbursment, and this is how it looks like;
> > Transid dis_date Name chq_bank amount
> > 001 01/01/2012 John PLC Bank 150
> > 005 15/01/2012 Fred SSB Bank 285
> > 009 01/02/2012 Gina SSB Bank 680
> > 003 20/01/2012 Pat PLC Bank 1000
> > 010 01/01/2012 Hook SSB Bank 360
> > 016 15/01/2012 Rita SSB Bank 750
> > 002 01/01/2012 Yaa PLC Bank 1500
> >
> > The report is the same as the view is, I want to group them by dis_date and SUM on the dis_date on the report. I want my report to look like the below;
> >
> > Transid dis_date Name chq_bank amount
> > 001 01/01/2012 John PLC Bank 150
> > 002 01/01/2012 Yaa PLC Bank 1500
> > 010 01/01/2012 Hook SSB Bank 360
> > Total for 01/01/2012 2,010
> >
> > 005 15/01/2012 Fred SSB Bank 285
> > 016 15/01/2012 Rita SSB Bank 750
> > Total for 15/01/2012 1,035
> >
> > 009 01/02/2012 Gina SSB Bank 680
> > Total for 01/02/2012 680
> > 003 20/01/2012 Pat PLC Bank 1000
> > Total for 20/01/2012 1,000
> >
>
> First, modify your view definition to put the records in the order you want them for reporting. It looks like you just need to add ORDER BY dis_date to the view.
>
> Once you have that, it's pretty easy. In the Report Designer, choose Data Grouping (either from the Report menu or from the right-click menu). Click the Add button and put Dis_Date in as the grouping expression. Click OK twice to get out.
>
> You'll see that your report has two new bands, a header and a footer for the group. To get the total by group, drop a field into the group footer underneath the amount column in the detail band. Specify Amount as the expression, then switch to the Calculate tab and specify Sum as the Calculation type. The Reset based on dropdown should already be set to the group.
>
> That's it.
>
> Tamar

thanks. will try and give you the feedback

ENTIRE THREAD

How to Group Data on Report Posted by Patrick Danso @ 5/16/2012 9:29:33 PM
RE: How to Group Data on Report Posted by Tamar Granor @ 5/16/2012 10:29:40 PM
RE: How to Group Data on Report Posted by Patrick Danso @ 5/16/2012 10:49:36 PM