Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Option of grouping or no group

Status
Not open for further replies.

Hacim

Technical User
Sep 5, 2002
63
US
Am using CR 8.5 Win 2000 and would like to give the person opening my report (using a crystal viewer)the option of viewing the report showing groups by "unit" or just a basic list of patients in alphabetical order. I created a formula called "unit" which says that if {location}in ['1','2','3'] then 'UNIT 1'else if {location} in ['4','5','6'] then 'unit 2' , then I created a group with the formula 'unit'. Can't figure out how to create a parameter without using a field from the table to give the viewer an option of grouping the report or not grouping.
 
You would want to use a formula to change the grouping formula, such as:

if {?MyGroupParameter} = "yes" then
(
if {location}in ['1','2','3'] then
'UNIT 1'
else
if {location} in ['4','5','6'] then 'unit 2'
)
else
{table.patient}

Then conditionally suppress the group header and footer section by using a formula in the X2 next to Suppress such as:

{?MyGroupParameter} <> "yes"

This will show the rows grouped by the location if the parameter = yes (or whatever you'd like), then if they select no, it would suppress the groups and you will have thee rows sorted by the patient.

Hope this is what you're after.

-k
 
Aha!!! Stumbled across a crazy solution that worked.

Under group expert, I dragged the field over twice. Specified Order on the first one, Ascending on the second. Then I had to delete the headers and footers from that second group that weren't needed and everything looks spiffy now. Success!!!
 
jollyreaper,

You should have responded in your original thread, perhaps referencing this one by using the thread number as a link, so that readers know your issue has been solved.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top