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!

how to use a database table in an array?

Status
Not open for further replies.

wgg

Programmer
Apr 25, 2001
47
BB
hi
I have a database table workdates that has holidays with a
type 'h'. HOw do i utilize this table so that my array reads only the holidays? I have used :

beforereadingrecords;
datevar array holidays:=[
date(1983,01,01),
date(1983,11,30),
date(1991,01,01),...]0

and hard coded the dates. there has to be a better way?
Thanks.
 
Why are you using an array?

If you only want holidays returned from the database, use the record selection formula with something like:

{table.field} = "H"

Rather than pigeon holing responses to your architecture, consider posting the requirements, as in:

Crystal version
Database/connectivity used
Example data
Expected output

I have a whitepaper on building a Period table which includes the SQL script, perhaps that will help:

faq767-4532

-k
 
the report is to show the number of vacaction days and within someones vacation days they have public holidays.
Therefore i can not use the record selection to select only the date='h'. It has to be a field to compute the vacation days minus the holidays. I found a piece of code which can do it, but in one of the formulas they hard code the holidays as i mentioned before. In my record selection i already have filtered out the vacation and dates.

Help still needed?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top