I am retrieving data from Baan for my crystal report. I want to use the Baan company calendar to include holidays and work hours in my calculations. How do I use the Baan calendar?
Since I do not have this product I cannot give an exact recommendation.
Assumptions: Holidays are stored in a table.
If working days and hours are stored in a table, that is easiest otherwise go to the Crystal KB and do a search for Business Hours, you should find a formula that will accomodate your business days and hours.
However, the app I do reporting for has a holiday table. The table holds the length of the holiday (days) and the startdate of the holiday. Not knowing how yours is structured makes it difficult for me to give you an exact formula.
For the Holiday, what I do is create a sql expression (Crystal 8.5):
(Select sum(([length]*24),0)from Holiday where startdate >= [Open Date] and startdate <= (case when [status] = 'O' then getdate() else [Closed Date] end))
I do a similar calculation for working hours on holidays which in my db is stored in a separate column.
You can do a similar query which accomodates your table structure. The above is a correlated subquery as it references fields in the view in the main select statement of Crystal.
When you add a sql expression to a report it adds it to the main select statement which you can view doing a Database/Show SQL Query.
I hope this information was helpful. If not, hopefully someone with this app will reply.
On Crystal 8.5, Custom Style for Format Dates seems to offer a choice of calendars. Where I work, there is only the Gregorian calendar. But I assume Crystal offer other options. Is this relevant?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.