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

Chart Help 1

Status
Not open for further replies.

jenschmidt

Programmer
Sep 30, 2002
145
US
I have a pie chart in GH1 and I basically want to show only the legend, not the pie chart.

I've tried to "hide" the chart by coloring all the pieces white, but formatting is still an issue because the legend likes to float around when I shrink the chart box (which you would want it to do in a normal situation - this time I want it to stay large enough to read but also make room for other pieces of information).

I've tried to recreate what the legend is showing, bypassing the chart altogether, with formulas. The legend displays as follows:

Sun Prairie 54.3%
Madison 8.0%
Marshall 6.3%
DeForest 3.9%
Columbus 3.4%
Cottage Grove 3.0%
Rio 2.9%
De Forest 2.1%
Poynette 1.4%
Waterloo 1.2%
Others 13.1%

Total: 100.0%

The pie chart shows the top 10 cities (including Others and Ties) for GH1 and top 10 is determined by a distinct count of @INT_PAT_ID:

if isnull({TABLE.INT_PAT_ID})
then "0"
else
if {TABLE.PRODUCTION_CAT}<>"MD"
then "0"
else
{TABLE.INT_PAT_ID}

I submitted this question a few days ago and hadn't gotten any response so I thought I would try again. Please let me know if there's something I could explain differently to help obtain some input from all the Crystal experts that frequent this site - I've learned a lot from you guys already.

Thanks much for the help!

jennifer.giemza@uwmf.wisc.edu
 
What version of CR are you using?

-LB
 
Oops - sorry! Using v9

jennifer.giemza@uwmf.wisc.edu
 
Why not use a crosstab instead? I believe 9.0 allows percentage of total as a summary. You would add {table.city} as the row with no column field, and then choose percent of total for the {table.field} you are summarizing. Then click on the upper left corner of the crosstab and go to report->topN/group sort and choose topN, with N = 10.

I'm concerned about the formula you are using though. You will get a count of 1 for all records that = "0" when you do the distinctcount for each group. Do you have duplicate records? If not, then it would be better to use:

if isnull({TABLE.INT_PAT_ID})
or {TABLE.PRODUCTION_CAT} <> "MD"
then 0 else 1

Then insert a summary (SUM, not count). If you have duplicates then this wouldn't work correctly.

-LB
 
That's perfectly EXACTLY what I needed!! Thanks! I don't know why I never think of crosstabs on my own - but I appreciate the input!

jennifer.giemza@uwmf.wisc.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top