I'm working on a report which needs to pull 10 percent of individuals receiving a particular medication and sorted by program and prescriber.
I started with a Record Selection that limits the records to a date range and the med. There are 3 groups on the report; Program, prescriber, and patient.
I need to end up with lists of the patients' charts that will be audited.
This is what I tried:
A formula field, @RandomNumber contains only {Rnd()} and was placed in the detail section but that gives a random # for each script written. I moved the field to grpheader3 where it gives a random # for each patient and surpressed the detail line.
A running total {#grpcount} that does a distinctcount of the patient ID field, evaluate for every record, reset never - was added to groupfooter2
Group/Sort Expert for group3 is sorted on {all} and based on summary field Max of @RandomNumber which is placed in grpfooter3
I think I'm on the right track but need some help on the surpression part.
In groupheader 3 and groupfooter3 I tried to surpress with
{#grpcount}>(.1*count({med_name})))
but it surpresses all the records. If {med_name} in the surpression formula is traded for {patient}, then none of the records are surpressed. I'm missing something.