Hi everybody,
I work for a hospital and Crystal Reports 8.5 and 2008 to write reports against an Oracle database, but the database is managed by a different group and because of potential confidentiality issues I don't have direct access to the database to create views, stored procedures, etc.
I've viewed faq767-3260, but I'm having difficulty getting it to work for the types of reports that I am trying to write. I've actually got the reports written, but now I'm attempting to rewrite them to add the random method.
The problem I'm having is that I'm unable to use the method to select only the records that I'm grouping by. For example, one of the reports shows a list of all the people that have accessed a patient's medical record in the database. I group by patient and have been asked to randomly pull 10% of the patients for the date range indicated.
The method in the FAQ shows that you add the @Random_Number field in the details section, but that pulls random records for each patient when my goal is to pull random patients and show all the records for those patients. I've tried adding the @Random_Number to the group header, but it doesn't appear to be working at all...it either suppresses all group headers or it doesn't suppress any group headers. Plus, and this is fairly obvious, it doesn't suppress any of the records in the details section.
Does anyone know of a way to modify the method to accomplish what I'm attempting to do or is there a way to create a separate function that will achieve this? Please keep in mind when making suggestions that I'm unable to create alternate views, stored procedures, etc.
I really appreciate the help,
beacon
I work for a hospital and Crystal Reports 8.5 and 2008 to write reports against an Oracle database, but the database is managed by a different group and because of potential confidentiality issues I don't have direct access to the database to create views, stored procedures, etc.
I've viewed faq767-3260, but I'm having difficulty getting it to work for the types of reports that I am trying to write. I've actually got the reports written, but now I'm attempting to rewrite them to add the random method.
The problem I'm having is that I'm unable to use the method to select only the records that I'm grouping by. For example, one of the reports shows a list of all the people that have accessed a patient's medical record in the database. I group by patient and have been asked to randomly pull 10% of the patients for the date range indicated.
The method in the FAQ shows that you add the @Random_Number field in the details section, but that pulls random records for each patient when my goal is to pull random patients and show all the records for those patients. I've tried adding the @Random_Number to the group header, but it doesn't appear to be working at all...it either suppresses all group headers or it doesn't suppress any group headers. Plus, and this is fairly obvious, it doesn't suppress any of the records in the details section.
Does anyone know of a way to modify the method to accomplish what I'm attempting to do or is there a way to create a separate function that will achieve this? Please keep in mind when making suggestions that I'm unable to create alternate views, stored procedures, etc.
I really appreciate the help,
beacon