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

Faily new in Crystal Reports (version IX) 1

Status
Not open for further replies.

Molkas

Technical User
Jun 2, 2004
15
US
How do you calculate the previous business day from today (excluding Saturdays and Sundays)?

Thank you sincerely for your help.

Merry Christmas.

Molkas Guevara
 
Try:

if dayofweek(currentdate) = 2 then currentdate-3 else
if dayofweek(currentdate) = 1 then currentdate-2 else
currentdate-1

-LB
 
It works very well!. Thank you lbass very much for sharing your knowledge with me.

Just wondering. Is there a way that this formula could be saved as a "function" so it can be used in multiple reports?

Merry Christmas.

Molkas Guevara
 
If you use Crystal Entrerprise, you can place the formula in the repository and reuse it.

A simpler copy & paste method is to open a "master" report with that formula on the report layout, select and copy the formula object (Ctrl-C), switch to a target report, and paste (Ctrl-V). This would copy the formula onto the target report.

Cheers,
- Ido

Visual CUT & DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Crystal XI developer supports a repository does it not?

Software Sales, Training, Implementation and Support for Macola, eSynergy, and Crystal Reports
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top