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!

Median in "Cross-tabulation" style 8.5 Crystal Report

Status
Not open for further replies.

gal

Programmer
Mar 5, 2002
25
US
This CR lists Median Number of DAYS used by a given geographic Region, by Hospital. Hospitals are placed horizontally across the page creating a "Cross-tabulation" effect. Region levels occur at Group Footings GF2-GF4. At each GF, I Inserted a Summary-Median of DAYS for each Hospital.

The problem is that any given Hospital may not be used by a given geographic Region. When there are no days spent at that Hospital for that Region, the values of DAYS is null, but a zero is reported. Unfortunately, the zeroes are automatically factored into the Summary-Median calculation. (The same goes when I calculate Summary Averages.)

Is there a simple way to eliminate the null values from the Summary-Median calculation and keep the report layout the user desires? Thank you in advance.
 
If you can, you could use the record selection formula to eliminate 0 days, as in:

{table.days} <> 0

Otherwise, you could do the following. It sounds like you have created a manual crosstab. Instead of inserting summaries, you could use running totals where you select {table.days}, median, evaluate using a formula:

{table.days} <> 0 and
{table.hospital} = "Hospital X"

Reset on change of group.

You would have to create a running totals for each group level per hospital.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top