CRXI and SQL Server
I have a report that I want to select records by the appointment dates in our scheduler tables. I want to automate it to run on a wednesday but choose all the clients who are scheduled for Dr. appts for the next week (M-F).
It is run now by a person manually selecting the appt dates for the next week. How do I rewrite the selection formula to automatically select for the next weeks dates based on the report run date? I know how to make it automatically run every wednesday in Infoview.
The current selection formula is:
not ({Program.program_name} in ["DD ALZHEIMERS RESPITE", "DD COMMUNITY INPATIENT", "DD EMERGENCY SERVICES", "DD FAMILY SUPPORT", "DD STATE INPATIENT", "MI ADULT COMMUNITY INPATIENT", "MI ADULT CRISIS RESIDENTIAL", "MI ADULT EMERGENCY SERVICES", "MI ADULT GERIATRIC ASSESSMENT", "MI ALZHEIMERS RESPITE", "MI CHILD COMMUNITY INPATIENT", "MI CHILD CRISIS RESIDENTIAL", "MI CHILD EMERGENCY SERVICES", "MI CHILD STATE INPATIENT"]) and
{Service_Group.service_group_name} in ["ACT", "ACT TEAM", "HOME BASED", "HOME BASED CLUSTER", "PSYCHIATRIC", "PSYCHIATRIC CLUSTER"] and
{Authorizations.archived} = 0 and
{Authorized_Service_View.archived} = 0 and
{Authorizations.authorization_end_date} >= DataDate - 45 and
not ({Sch_Entry.name} like ["*CANCEL*", "*RESCH*"]) and
{Sch_Entry.start_date} in DateTime (2009, 06, 22, 0, 0, 0) to DateTime (2009, 06, 26, 0, 0, 0)
It seems like I should put a DayofWeek formula in and use that but I am not sure. Can anyone assist me? Thanks!
I have a report that I want to select records by the appointment dates in our scheduler tables. I want to automate it to run on a wednesday but choose all the clients who are scheduled for Dr. appts for the next week (M-F).
It is run now by a person manually selecting the appt dates for the next week. How do I rewrite the selection formula to automatically select for the next weeks dates based on the report run date? I know how to make it automatically run every wednesday in Infoview.
The current selection formula is:
not ({Program.program_name} in ["DD ALZHEIMERS RESPITE", "DD COMMUNITY INPATIENT", "DD EMERGENCY SERVICES", "DD FAMILY SUPPORT", "DD STATE INPATIENT", "MI ADULT COMMUNITY INPATIENT", "MI ADULT CRISIS RESIDENTIAL", "MI ADULT EMERGENCY SERVICES", "MI ADULT GERIATRIC ASSESSMENT", "MI ALZHEIMERS RESPITE", "MI CHILD COMMUNITY INPATIENT", "MI CHILD CRISIS RESIDENTIAL", "MI CHILD EMERGENCY SERVICES", "MI CHILD STATE INPATIENT"]) and
{Service_Group.service_group_name} in ["ACT", "ACT TEAM", "HOME BASED", "HOME BASED CLUSTER", "PSYCHIATRIC", "PSYCHIATRIC CLUSTER"] and
{Authorizations.archived} = 0 and
{Authorized_Service_View.archived} = 0 and
{Authorizations.authorization_end_date} >= DataDate - 45 and
not ({Sch_Entry.name} like ["*CANCEL*", "*RESCH*"]) and
{Sch_Entry.start_date} in DateTime (2009, 06, 22, 0, 0, 0) to DateTime (2009, 06, 26, 0, 0, 0)
It seems like I should put a DayofWeek formula in and use that but I am not sure. Can anyone assist me? Thanks!