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

Help on generate automatic groups!!

Status
Not open for further replies.

sbelt

MIS
Nov 26, 2003
18
NL
Hi,

I'm making a report in CR7.
I have a list of names, emailadress etc which holds over 10.000 records.

Now I want to make different groups for each 1.000 records.
For example:
Record 1-1000: group 1
Record 1001-2000: group 2
Record 2001-3000: group 3

Is it possible to automaticly generate such groups?
If so, can somebody help with this?

Thanks in advance!
Sander
 
It probably is possible using a formula with "WhilePrintingRecords;" and returning different fields to group on.
But why do you want to do this? Would it not be easier to produce three separate reports that are filtered and then grouped by a single field. They could then even be introduced as subreports on to one report if that would help.
 
Hi,

I think I was not clear enough by using the word group. I don't want to make a group. What I want is to add a number to a field in the record. If the record is in 1-1000, I want to add a 1, if a record is in 1001-2000 I want to add a 2, etc. Like this:

(record1) name email 1
(record2) name email 1
(record1001) name email 2
(record2001) name email 3

I think a formula with "While printing records" is the solution, but I don't know how to do this...
 
I see. You need to create a formula:

"
WhilePrintingRecords;

if RecordNumber <=1000 then "1"
else if RecordNumber >1000 and RecordNumber <=2000 then "2"
else if RecordNumber >2000 and RecordNumber <=3000 then "3"
"

and add that formula field to the details section next to email.

Does this help?
 
Yes, this was it. It works fine.
Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top