I have a cross tab that is sorted on YEAR > MONTH > PT TYPE so that JAN 11 and JAN 12 are together to be compared etc.
Last we changed midyear the way we recorded a certain set of data thus I have to use different criteria to correctly select data. Below are the formulas I am using. I am verifying JAN 11 data and it is pulling data from a room specified in the NOT clause. Can anyone tell me why?
FORMULAS:
@2011
{v_Surg_Proc_CR.cr_prdate} = {?Date} and
not ({v_basic_case_rec_data.room_mnc} in ["JASU_XRAY", "JGI08", "JGI09", "JGI10", "JGIMOTLTY", "JIXR", "JIXRADDON", "JTRNFSN1", "JTRNFSN2"]) and
{v_basic_case_rec_data.fac_descr} = "XXX" and
not({v_Surg_Proc_CR.surg_service} in ["DIAGNOSTIC","MEDICINE"])
@2012
{v_Surg_Proc_CR.cr_prdate} = {?Date} and
not ({v_CRA_01_General_Stats.bk_pat_type} in ["ASU_LOCAL","IP_GI_XRAY","OP_GI_XRAY"]) and
{v_basic_case_rec_data.fac_descr} = "XXX" and
not({v_Surg_Proc_CR.surg_service} in ["DIAGNOSTIC","MEDICINE"])
@YEAR
year(currentdate)
RECORD SELECTION FORMULA
if ({@year} = ({@year}-1)) then
{@2011} else
if ({@year} = {@year}) then
{@2012}
I actually originally had
if ({@year} = 2011) then
{@2011} else
if ({@year} = 2012) then
{@2012}
with the same incorrect results but then i started fooling around and trying to make the date not hardcoded in the formula. I would actually like to do that once i get this working but one step at a time...
I am using crystal 11. Thank you in advance for any help!
Last we changed midyear the way we recorded a certain set of data thus I have to use different criteria to correctly select data. Below are the formulas I am using. I am verifying JAN 11 data and it is pulling data from a room specified in the NOT clause. Can anyone tell me why?
FORMULAS:
@2011
{v_Surg_Proc_CR.cr_prdate} = {?Date} and
not ({v_basic_case_rec_data.room_mnc} in ["JASU_XRAY", "JGI08", "JGI09", "JGI10", "JGIMOTLTY", "JIXR", "JIXRADDON", "JTRNFSN1", "JTRNFSN2"]) and
{v_basic_case_rec_data.fac_descr} = "XXX" and
not({v_Surg_Proc_CR.surg_service} in ["DIAGNOSTIC","MEDICINE"])
@2012
{v_Surg_Proc_CR.cr_prdate} = {?Date} and
not ({v_CRA_01_General_Stats.bk_pat_type} in ["ASU_LOCAL","IP_GI_XRAY","OP_GI_XRAY"]) and
{v_basic_case_rec_data.fac_descr} = "XXX" and
not({v_Surg_Proc_CR.surg_service} in ["DIAGNOSTIC","MEDICINE"])
@YEAR
year(currentdate)
RECORD SELECTION FORMULA
if ({@year} = ({@year}-1)) then
{@2011} else
if ({@year} = {@year}) then
{@2012}
I actually originally had
if ({@year} = 2011) then
{@2011} else
if ({@year} = 2012) then
{@2012}
with the same incorrect results but then i started fooling around and trying to make the date not hardcoded in the formula. I would actually like to do that once i get this working but one step at a time...
I am using crystal 11. Thank you in advance for any help!