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

Graphing a formula field

Status
Not open for further replies.

mtrang81

Technical User
Oct 29, 2004
5
US
Hello all,

I have a production report that requires a line graph to follow to show seasonality. My report has fields such as 2003, 2004, 10-Yr Avg, and 2004 Projection (which is a formula).

I need to create a line graph showing 2004, 10-Yr Avg & 2004 Projection. The problem is that the 2004 Projection formula is not an available field for me to choose when I insert the graph. There are other formulas in my report that show up in the list of available of fields but for some reason, the 2004 Projection formula does not.

I'm using Crystal 9 and SQL. Any ideas???
I'd appreciate any suggestions.

Thanks,
Trang
 
Please share the formula for the 2004 projection and provide some information about grouping, etc. Where is the graph going to be placed?

-LB
 
Here's the 2004 Projections formula (which references other formulas):

2004 Projections: IF IsNull({Ten_Year_Projections.2004})
THEN {@MR}*{@YE Proj}
ELSE {Ten_Year_Projections.2004}

@MR: {Ten_Year_Projections.10-Yr Total}/Sum({Ten_Year_Projections.10-Yr Total}, {Ten_Year_Projections.Category})

@YE Proj: IF ISNULL({Ten_Year_Projections.2004})
THEN sum({Ten_Year_Projections.2004})/{@YTD MR}
ELSE {@2004 YTD}/{@TotalMR}

@YTD MR: NumberVar YTDMR;
If IsNull({Ten_Year_Projections.2004})
then {@TENYRTOTAL}/Sum ({Ten_Year_Projections.10-Yr Total}, {Ten_Year_Projections.Category})

@2004 YTD: NumberVar Total;
Total := Total + {Ten_Year_Projections.2004};

@Total MR: {#10 Yr YTD}/Sum ({Ten_Year_Projections.10-Yr Total})

@TENYRTOTAL: numbervar TENYRTOTAL;
TENYRTOTAL:=TENYRTOTAL+{@TENYR}

@TENYR: numbervar TENYR;
If IsNull({Ten_Year_Projections.2004})
Then TENYR:=0
Else TENYR:={Ten_Year_Projections.10-Yr Total}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Essentially, what I wanted to accomplish was a projection based on the monthly relativity (MR) and the YE Projection. I also needed to keep the YE projection constant if monthly 2004 number is not yet available. That's the reason for the multiple MR and Ten Year formulas.

My main report shows Production numbers and is grouped based on: Line of Business, State, & Category. Then I have a Lapse/Can subreport placed in GF1b and another subreport for Gain placed in GF1c.

I would like the main graph to be placed before the subreports in GF1a and the graphs for each subreport to be placed in its RF

Hope this provides more clarification.
Thanks for any suggestions you can come up with.

~Trang
 
Thanks lbass for the info! I followed the instructions and everything works perfectly now.

Thanks again!
~Trang
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top