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

Charting Question

Status
Not open for further replies.

Leighton21

Technical User
Dec 17, 2001
83
AU
Hi All,

I have an SQL TABLE which has a column of dates and a column of values for those dates. some of the values are null and when I create a chart the dates alon the axis appear when the value for that date is null.

Is there a formula to filter the dates where the value is null

Cheers
 
You could get rid of the records with null in record selection, e.g.
Code:
not isnull({your.date})

If you need those records for something else, try a formula, but that depends on your Crystal version. It helps to give your Crystal version - 8, 8.5, 9, 10, 11 or whatever.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Cheers Madawc,

I have version 11 think I have to use a formula because there are three charts and they look at different date intervals

Cheers
 
You could use a conditional formula for both the "on change of" field and the summary field as in:

//{@onchgof}:
if not isnull({table.date}) or
{table.date} <> date(0,0,0) then
{table.date}

//{@summary}:
if not isnull({table.date}) or
{table.date} <> date(0,0,0) then
{table.amt}

This will eliminate the axis label. However, if you are using a legend, there might be an unlabeled colored box corresponding to the default values. If this is an issue, your best bet is create the chart in a subreport where you can filter out the nulls in a record selection formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top