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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference Different Groups Values?

Status
Not open for further replies.

TechSlinger

Technical User
Oct 31, 2013
19
CA
Hi

I am using Crystal Reports 9.0 reporting from an Access database.

I have multiple groups in my report: 1) patient type (Medicine, Surgery, Obstetrical, Psychiatry and Paediatrics), 2) DOW (Weekday, Weekend), and 3) admit type (Urgent, Non-Urgent).

What I want to do is create a text box citing the various data elements per Group 1 i.e. "There were "+totext(var1,0)+" deaths during this timeframe.

However, I can't seem to figure out how to reference the arrays of the various groups. Using a statement like "If grpName1 = "Weekend" and grpName2="Urgent" then sum(deaths)" works but only if the last occurrence of each of those groups is Weekend and Urgent, otherwise it doesn't.

Is it possible to get at the values per group result in this fashion? If not, is there a way? Thanks.
 
Just create a running total for each group, that is reset on change of group.

Whenever I use running totals with multiple groups, I always include the group number in the name, such as {#G1 Deaths} - makes it much easier to keep track.
 
Hi Charliy

Thanks...but not sure how this would work if I'm trying to refer to one selection of the group? For instance, Group 2 is "day" which is either Weekend or Weekday as a group. And Group 3 is "type" which has the options of urgent and non-urgent. The text statements will be in the group footer of Group 1 which is Program.

So how would I create a running total to provide me with the total deaths (which is a field) for non-urgent cases that were admitted on the weekend? Thanks.
 
Hi Charliy

Not sure what you're asking but I have 3 groups:
1. ServiceGroupName - i.e. medical, surgical etc. This is the group (in the footer) where I want to be able to create this text note about the findings.
2. Day of Week - 2 possible results of either weekday or weekend
3. Type - 2 possible results of urgent or non urgent

The fields are number of cases, number of deaths and death ratio which is a calculated field of sum of deaths * 100/sum of total cases.

Any help you can offer is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top