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!

Help with charting

Status
Not open for further replies.

diamond6

Technical User
May 10, 2001
15
AU
I need to produce a sales history chart - just a standard bar chart showing sales per month.

Simple? Yes ... except each record in my datasource holds all twelve months figures

ie -
Account Number, Jan Sales, Feb Sales, Mar Sales, etc

Can anybody explain how (if) I can do this

Thanks all
 
Try using variables

create 14 formulas

Insert this one into header (page or group) depends on report
@Initialise
whileprintingrecords;
Global numbervar Jan:=0;
Global numbervar Feb:=0;
Global numbervar Mar:=0;
etc....

Insert this one into details
@evaluate
Global numbervar Jan:= Jan + {Jan Sales};
Global numbervar Feb:= Feb + {Feb Sales};

Insert these into Footer

12 formulas one for each month
@Display Jan
Global numbervar Jan;

@Display Feb
Global numbervar Feb;

etc

You should be able to use your display formulas for your chart.

Ian Waterman
UK Crystal Reports Consultant




 
Thanks ... but wouldn't this still leave me in the same position. Currently I have 12 Grand Totals (coming from the 12 monthly fields) and if I use your suggestion I would have 12 Variables - but still no way to graph these.

Why? Becasue normally I would be working with data that had 1 record per sale with 2 fields per record - date and amount (greatly simplified). This would create a chart graphing amount 'on change of date' grouped by month. Have I missed something in the charts where I can link 12 different fields together in the same series?

Allan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top