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

How To Show Values Over Period Of Time - URGENT 3

Status
Not open for further replies.

jmwalke1

Programmer
Jul 25, 2003
3
US
I trying desperately to show total values over a given time period!

Does anyone know how to get the x-axis to be a regular series (increment by a constant value - regardless of the presence of a datapoint) between my min and max date values?

I'd like to keep my data in a line chart and have "Total Hours" as my y-axis (no problem there) and "Time" as my x-axis.

The problem is that the x-axis isn't adjusting for the difference between two datapoints. For instance, if I collected data on 1/1/20003 and not again until 1/20/2002, instead of having x-axis ticks that show the time difference between the 1/1/2003 and 1/20/2003 dates, it's graphing the 1/1/2003 and 1/20/2003 datapoints as if they were consecutive (no time difference between them).

PLEASE HELP!!!
 
Your dilema is a common one, you want to graph points for data that does not exist.

The real solution is to generate a periods table which contains all dates, and use a left outer to your data, hence you'll get all of the time periods.

-k
 
Good to know it's not just me :)

I'm new to Crystal Reports - can you provide a little more detail on how to do a "left outer"? I've generated a table with all dates, so that part is ready, but I'm not sure where/how to include that with the other table. I'm using an ADO Dataset as my datasource if that makes a difference.

Much appreciated.
 
Add the periods table.

Join the periods table by the date to your main tables date field, select Link Options and select Left Outer (the arrow should be from the Periods table to your table).

Use a parmeter or hardcode the date range into the record selection formula to select all rows from the Periods table.

You should now see all of the dates for whatever period you specify.

You can now graph on the data for the entire period.

-k
 
It's looking much better - thanks for the help so far!

One last question... now that I've got the x-axis data points all showing up, do you know how change their label font size, frequency, or change text angle so that they don't overlap and make themselves unreadable?
 
Bounce..!

I have just had to do the same thing as above - however I have 2 sets of data to compare: How many op's were referred and how many op's were done is a given week. Very rarely will an op referred be done in the same week.

I can get one or other of the sets to display the correct results - but not both..!

I am using CR9.0 and have got 3 tables

Table 1 = PeriodDate
Field = date

Table 2 = Referrals
field = date_of_ref

Table 3 = Ops
field = op_date

Thanks for any help that you can give.

Vis.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top