Posted By: wsc27 — 15 Mar 2021 at 8:37am
I am using the rnd() formula to assign random # based on a field at the group level. The field can have multiple detail lines. My report setup currently is only pulling if the random # assigned appears once instead of all of the detail lines for the random # for the field at the group level.
I would like for report be like example below…….
Example: Audit User 1 – Random# 100
Details for Random User #100
Details for Random User #100
Details for Random User #100
But Crystal is doing this instead
Example: Audit User 1 - Random# 100
Details for Random User #100
(Leaving out the other detail lines for the group)
Seems like even though random is at the group level, the report only uses one random# at the detail level instead of multiple details per grouped random#. Please assist.
Thanks
Posted By: DBlank — 15 Mar 2021 at 10:16am
Are you trying to get the report to randomly select a user based on their ID?
Posted By: wsc27 — 15 Mar 2021 at 10:27am
@DBlank Yes, I am then display all of the multiple detail lines for that one or multiple randomly selected users.
Posted By: DBlank — 15 Mar 2021 at 10:37am
I don't think this will work that way for you.If possible can you do the random selection process in your select statement or stored procedure? I think maybe you could group on the staff ID and use the rnd() value i the group header and sort by the rnd formula field adn you the top 1 group select. but you would need to select your entire data set to when running the report.
Posted By: wsc27 — 17 Mar 2021 at 5:44am
Instead of using an audit report as an example. I am testing the random # at group level with appointments. When I put the random# at the group level for the patient, it's only returning one appointment for each patient instead of all appointments? How can I assign a random # for each patient, but show all appointments? Thank you!