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!

Group Sort Expert (show null rows)

Status
Not open for further replies.

AAKissinger

Technical User
Dec 5, 2010
4
US
I'm using Crystal X1 and a newbie. In constructing my data, I need to have it grouped by facility then by top 5 drug. I'm sucessful using the group sort expert pulling the top 5 drug when the facility has enough data. The problem is when I have a facility with less than top 5, I want to show blank rows to represent the smaller data pools and keep each facility formatted the same size.

A perfect scenario with some of my facilities:

El Monte
Drug Processed
Lipitor 130
Humalog 110
Spiriva 89
Proventil 85
Dulara 50
Other: 125
____________________________________________


What's happening with small facilities with limited data:

Hudson
Drug Processed
Lipitor 65
Zetia 50
_____________________________________________

What I need to report:

Hudson
Drug Processed
Lipitor 65
Zetia 50




______________________________________________


 
If you can change the database, or if Facility is already a separate dataset, have a left-outer link from Facility to the other details. So those details will still be there (as null values) when there are no records.

Note that you need to check for nulls using IsNull before any other tests. Cystal will otherwise stop without output whenever it hits a null.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 2008 with SQL and Windows XP [yinyang]
 
Insert four additional facility group footers (a to d), and then format GF1a to suppress with a formula:

distinctcount({table.drug},{table.facility})>1

Use the same formula for b, c, and d, and increment the number by 1 for each. If you want one blank line between each facility group, insert a section e with no suppression formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top