Hello
I've created a Crystal report which returns about 200,000 records. I now need to select a random sample of 10,000 records from that. Does anyone have any suggestions? I've tried using the TopN function but that was unsuccessful.
Can anyone help?
Thanks LB for your help but I'm sorry - I don't follow it all.
I've gone into the select expert and the chosen "show formula" and then "formula editor".
My formula at the moment is as follows:
{CBCONHPF.THCRST} = "A" and
{CBBSECPF.BSBSDS} = "Residential" and
{CBCONHPF.THOWTY} <> 3.00 and
{CBCONHPF.THCOMP} = "01"
Where do I put the {@random} command?
I understand your second instruction about format, section, details and suppress.
1-Create a formula using the random function by going to insert->formula field->new->name it "random" and enter:
Rnd()
2-Place the formula {@random} on the report in the details section.
3-Then go to report->sort records and add {@random} as the sort field.
4-Then go to format->section->details->suppress (you don't need to check it)->x+2 button to the right (this is the formula area for section suppression) and enter:
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.