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!

Missing Dates for database that has some dates

Status
Not open for further replies.

emc28

IS-IT--Management
Feb 9, 2010
1
US
I am new to crystal reports and I need some major help with a formula or direction on how to do the following. I have a report that groups worker by full name and by date. In my database I have hours worked for some dates of work but not for every date in the month. I need to display every day of the month based on the desired date range. I would like to show each date of the month those with out data should show the date with zeros. I am using Crystal 10 with an OBDC connection to SQL server. Keeping in mind that some months have more dates than other.


Sample of what I am trying to do;

Sam Toyota
11/1/11 8.00
11/2/11 0.00 (this did not exist in the {san.time} table)
11/3/11 2.25
ect.

Any help would be great.

 
Are you able to get tables / datasets added to the database? If you got a table of DATE set up, this could be linked to the activity using LEFT OUTER and you'd still get a slot when there was no activity. (But note that any selection on the second table must do an IsNull test first, otherwise you'll not get the dates with no records, null value for the second record.)

If you can't add a table, you'll be stuck with creating a 'Mock Crosstab'. Crosstabs are fine if you don't mind the absence of rows or columns with no data, but you said you wanted empty slots to show.

A 'Mock Crosstab' is something that looks like a Crosstab, but in fact you define each column yourself, normally as a running total. This would need to go in the report footer, because running totals count as the reports 'run' and they will not be complete until then. Crystal should have included an example along with the Crosstabs.

You can save a little time by doing a paste to a dummy report, changing the name and then pasting back. In Crystal 11.5, you can also duplicate formula fields using the Field Explorer.



[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top