Joined: 25 Jun 2012
Online Status: Offline
Posts: 10
Topic: Random Number Group Posted: 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.
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 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.
Joined: 25 Jun 2012
Online Status: Offline
Posts: 10
Posted: 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!
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum