Hello,
I am attempting to display appointment times from 3 different tables. Each field is minutes from midnight. Here's the formula:
if {APPOINT.Appointment} > 0 then ( if Truncate ({APPOINT.From} / 60 ) > 12.00 then ToText ((Truncate ({APPOINT.From} / 60 )) - 12,"0") +":"+ToText (Remainder ({APPOINT.From},60 ),"00") + "PM" else if Truncate ({APPOINT.From} / 60 ) = 12.00 then ToText (Truncate ({APPOINT.From} / 60 ),"0") +":"+ToText (Remainder ({APPOINT.From},60 ),"00") + "PM" else ToText (Truncate ({APPOINT.From} / 60 ),"0") +":"+ToText (Remainder ({APPOINT.From},60 ),"00") + "AM" ) else if {RESERVE.Appointment} >= 0 then ( if Truncate ({RESERVE.Start} / 60 ) > 12.00 then ToText ((Truncate ({RESERVE.Start} / 60 )) - 12,"0") +":"+ToText (Remainder ({RESERVE.Start},60 ),"00") + "PM" else if Truncate ({RESERVE.Start} / 60 ) = 12.00 then ToText (Truncate ({RESERVE.Start} / 60 ),"0") +":"+ToText (Remainder ({RESERVE.Start},60 ),"00") + "PM" else ToText (Truncate ({RESERVE.Start} / 60 ),"0") +":"+ToText (Remainder ({RESERVE.Start},60 ),"00") + "AM" ) else if {VACATION.Id} >= 0 then ( if Truncate ({VACATION.StartTime} / 60 ) > 12.00 then ToText ((Truncate ({VACATION.StartTime} / 60 )) - 12,"00") +":"+ToText (Remainder ({VACATION.StartTime},60 ),"00") + "PM" else if Truncate ({VACATION.StartTime} / 60 ) = 12.00 then ToText (Truncate ({VACATION.StartTime} / 60 ),"00") +":"+ToText (Remainder ({VACATION.StartTime},60 ),"00") + "PM" else ToText (Truncate ({VACATION.StartTime} / 60 ),"00") +":"+ToText (Remainder ({VACATION.StartTime},60 ),"00") + "AM" )
{APPOINT.Appointment}, {RESERVE.Appointment}, {VACATION.Id} are the unique primary keys for each table. The problem I'm having is with the last portion, VACATION.StartTime, to display on the report. This formula is in a subreport that is in the details section of the main report. The report displays clinic appointments, vacations times, and blocked times for students at a dental school. Based upon the parameter date, it should display what each student has scheduled for that day. Right now, only APPOINT and RESERVE table data is showing up.
I'm a newbie at this stuff, so I apologize in advance. Please let me know if there's more required information or if screenshots are needed.
Thanks,
|