Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP6: Inverted group footer band in reports?

Status
Not open for further replies.

Kimed

Programmer
May 25, 2005
104
LT
Hi.

VFP's normal report structure implies that any group starts with header, where common characteristics are listed, detail band, and a footer, for totals and summaries. Where I live, though, accountants favor the different layout, where totals go first:
Code:
TOTAL:         SUM(xyz)
 of them, X:   SUM(x)
     of them:  x1
               x2
               x3
 of them, Y:   SUM(y)
               y1
               y2
               y3
 of them, Z:   SUM(z)
               z1
               z2
               z3
Is it possible to arrange a VFP report like this without compiling additional cursors with no other purpose than having group totals?
 

I would say, no.

Most likely, (in VFP6, at least), you cannot put summary info into a header without some additional calculations, variables, or other artificial constructs. The way it's designed, it is calculated as you go along the table, which is at the point when a field you group on is about to change its value - so the usual place for the group summary is a group footer, not header.

Even if it VFP6 was able to do this, it would be done the same way - precalculating some variables/cursors in advance, just doing it internally, without you knowing it, but it would take about same extra time/resources, so you might do it yourself as well.
 
I agree with Stella.

To get this done solely within the Report Form is not possible.

But you could accomplish this with some pre-calculation prior to submitting the data to the Report Form and make it appear the way you want.

Merely pre-calculate the sums and put them into their own field within the Report data. Then submit the data to the Report Form.

Then they are readily available in the Report Form when/where you need them to appear.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top