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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Avoid repeating values in Report 2

Status
Not open for further replies.

Koen Piller

Programmer
Jun 30, 2005
841
NL
Hi,
I have similar problem as my last problem with VFP reports.
I would like to avoid repeating values, I have a clubs.dbf with structure:
id i, round c(2), gamedate d, home c(25), vistorclub c(25), result c(5)

Club.dbf
Round Home Visitor Gamedate Result
1 Club1 Club2 01-08-2019 2-0
1 Club3 Club4 01-08-2019 0-0
1 Club5 Club6 02-08-2019 1-1
1 Club7 Club8 02-08-2019 0-2
2 Club7 Club1 03-08-2019 8-0
2 Club6 Club3 03-08-2019 0-0
2 Club2 Club4 03-08-2019 3-3


Would like to have a report like:

Round1
August 1st
Club1 Club2 2-0
Club3 Club4 0-0
August 2nd
Club5 Club6 1-1
Club7 Club8 0-2
Round2
August 3rd
Club7 Club1 8-0
Club6 Club3 0-0
Club2 Club4 3-3

I can group the Round in a group, but I cannot group the gamedate in an inner group. How to do this?

Regards,

Koen
 
Form an index like this, then base your report on that.
Code:
Index on str(round,3,0)+dtos(gamedate)+home+visitor tag club


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Koen,

I don't see why you can't group on the date as well as the round. In the Data Grouping tab of the Report Options dialogue, you create a group based on the round, and then one based on the date. If necessary, use the mover bars in the Group Nesting Order control to establish the correct nesting.

Have you tried doing that? What is the result?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Mike,
You are, of course, corect. I was mistaken by the pervious problem with a group and a sub-group and did not even try it. Shame.
Thanks for pointing me to correctnes.
Regards,
Koen
 
I'm glad it worked, Koen. When I saw your question, I was thinking I had misunderstood the way the grouping hierarchy works. I had to actually create a quick report to check the answer I gave you.

What you can't do in VFP (as far as I know), is to display the contents of the grouping field on the first detail line within the group, and not have it repeat on subsequent lines in the group. I am accustomed to Crystal Reports, where that sort of thing is very easy.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top