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

Creating a schedule that includes "empty" times 1

Status
Not open for further replies.

posero

Technical User
Aug 6, 2000
8
DE
I need to create a staff schedule that shows all appointment times available, not only the ones that have data in them.

For example, in my staff scheduler you might see:

09:00 Consultation Mr Andrews
10:00 Consultation Mr. Withers
13:00 Consultation Ms. Frew

What I want is for the report to return the empty times as well:

09:00 Consultation Mr Andrews
10:00 Consultation Mr. Withers
11:00
12:00
13:00 Consultation Ms. Frew
14:00
15:00
16:00

I suspect that I can do this by creating an access database based on these times (which are stored as seconds after midnight in my database) and linking this to my btrieve database at the appointment time field.

I have tried to do this in access, but always received an error in Crystal when I tried to link the access database to my btrieve database.

I am not very access-literate, could anyone tell me the specific steps needed to make this work ?

Thanks in advance !








 
There is another way and we covered this in several articles over the previous year or two in Crystal Clear.

Essentially, use Previous and Next to fill in time values for the missing hours.

numbervar i;
stringvar hrs:="";

if {table.Employee} <> Next({table.Employee}) then &quot;&quot; else
If hour({table.appttime})+ 1 =
next(hour({table.appttime})) then &quot;&quot; else
If hour({table.appttime}) + 2 =
next(hour({table.appttime})) then
ToText(hour({table.appttime})+ 1 ,&quot;00&quot;) + &quot;:00&quot; else
(for i= hour({table.appttime})+ 1 to
next(hour({table.appttime}))-1 do (
hrs:=hrs + ToText(i,&quot;00&quot;) + &quot;:00&quot; + Chr(13)); hrs)

Place the formula in details b and format it to suppress blank sections.
Editor and Publisher of Crystal Clear
(
 
Thanks, a brilliant solution that I certainly would not have found myself !!! Wonderful !
 
A aolution I have found when Crystal doesn't like you linking an Access and a Btrieve file is to usa ODBC to either create a link table in MS Access and have crystal read both the access and btrieve tables from access, or to use ODBC rather than file.ddf as your connection to btreive.
Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top