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

Date Ranges: How to Create Date Ranges that are not in the Database

Status
Not open for further replies.
Nov 18, 2002
15
US
I am using Crystal 8.5 on an SQL dbase and am having problems with charting data.

I am trying to create a stacked bar chart of the total number clients in a treatment program.

Using the following tables and fields
Client
ClientID

AdmitReason
Fullname

Report should look as such

Group: AdmitReason
Detail: ClientID
Total: Count of Client ID

Need to chart an accumluative total on for each group on a daily basis and need to know how to create a daily date without using any of the date fields in the database. (Using them limits the data being pulled into the report.)

I would greatly appreciate anyone's help on this!

[afro]


 
This faq sounds like it might be a good start for you:
Creating data for dates not in the data set with SQL Server SQL to create a Periods Table
faq767-4532

 
Is there an easier way to create dates without creating a table? My skills are not as advanced as that.
 
Cystal groups on values that actually exist, that's how it works.

A long-winded alternative is to do separate running totals for all of the date-ranges you are using. You could derive these from the current date using DateAdd etc.

Since I don't use charts, I can't advise you about whether these running totals would be easily turned into a chart.

Madawc Williams
East Anglia, Great Britain
 
I'm curious if anybody can tell me if Madawc's running totals can be turned into a chart. I'm having a problem similar to cdennis321's.

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top