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!

Results for dates between Start and End dates

Status
Not open for further replies.
Jun 26, 2002
77
US
Using Crystal 2008 and SQL database.

Employees request time off. Database holds start and end dates for request. I have been asked to create a report that will display by each work day for a month, minus weekends and holidays, if employee is off P (Partial Day) or F (Full day). The report needs to be grouped by manager. I cannot get the results for the in between dates. A sample is below.


[tt]
Manager - Frank
11/1 11/2 11/3 11/4 11/7 11/8 11/9 11/ 10
Joe F F F F
Mary
Pete P
Jack P F F F
[/tt]
Joe has a vacation request starting 11/3 ending 11/8
Mary does not have a request in for November
Pete has a request for 2 hours off 11/1
Jack has a request for 3 hours 11/3 and vacation starting 11/8 ending 11/10.

Thank you.
 
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