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!

Calculate previous business day based on Holiday table

Status
Not open for further replies.

sajisher

Programmer
Dec 3, 2003
45
US
Hi,

There is a 'Holiday' table in SQL Server with holiday list for 2010.

In CR9 report, have to show AsOfDate as a previous business day which will be excluding holidays from this table and weekends.

This AsOfDate is placed in GH1 in report.

Should I create a subreport only with this Calendar table to calculate the previous business day and pass it to main report or use a stored procedure.

In any case, what will be the steps involved please. I am also looking elsewhere.

thanks

 
A method for finding business days is set out at faq149-4466. From this, adjust for your holiday days.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Thanks Madawc,

The link shows calculating number of business days between 2 dates.

I need to loop the holidays in the holiday table. Is there a ways I can do it crystal.
 
Sorry, that makes no sense to me. Can anyone else help?

[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