I have tried everything and still not working. I am really stuck. Can anyone help me please? Thank you so much!
I have a report right now that returns all data that counts weekend and holiday as a weekday. So therefore, I am adding the code (below) that maturity minus(-) settlement date does not fall on weekend and holiday. However when I run the report, I am still getting all data.
I created the code below in Formula Editor called ExWendsHoli. And in Select Expert, I added ExWendsHoli and
set it not equal to 1 (@ExWendsHoli}<>1. So, if I my settle date is 7/3/02 and maturity date is 7/5/02. And since 7/4/02 is a holiday I dont' want to see all records with 1 day of working day (maturity - settle) in the report.
****************************************************
DateVar Array PubHols:=[Date(2002,07,04)];
NumberVar StartDay:= DayOfWeek({transrpt.settle_dt});
NumberVar ElapsedDays:={transrpt.mature_dt}-{transrpt.settle_dt};
NumberVar WorkingDays:=0;
NumberVar NoPubHols:=Count(PubHols);
NumberVar i:=0;
NumberVar FirstWeek:= 7 - StartDay;
If ElapsedDays > FirstWeek Then
WorkingDays:=ElapsedDays-((1+(Truncate((ElapsedDays-(FirstWeek+2))/7)))*2)
else
WorkingDays:=ElapsedDays;
For i:=1 to NoPubHols Do
if PubHols in {transrpt.settle_dt} to {transrpt.mature_dt} then
Workingdays:= WorkingDays - 1;
Workingdays
I have a report right now that returns all data that counts weekend and holiday as a weekday. So therefore, I am adding the code (below) that maturity minus(-) settlement date does not fall on weekend and holiday. However when I run the report, I am still getting all data.
I created the code below in Formula Editor called ExWendsHoli. And in Select Expert, I added ExWendsHoli and
set it not equal to 1 (@ExWendsHoli}<>1. So, if I my settle date is 7/3/02 and maturity date is 7/5/02. And since 7/4/02 is a holiday I dont' want to see all records with 1 day of working day (maturity - settle) in the report.
****************************************************
DateVar Array PubHols:=[Date(2002,07,04)];
NumberVar StartDay:= DayOfWeek({transrpt.settle_dt});
NumberVar ElapsedDays:={transrpt.mature_dt}-{transrpt.settle_dt};
NumberVar WorkingDays:=0;
NumberVar NoPubHols:=Count(PubHols);
NumberVar i:=0;
NumberVar FirstWeek:= 7 - StartDay;
If ElapsedDays > FirstWeek Then
WorkingDays:=ElapsedDays-((1+(Truncate((ElapsedDays-(FirstWeek+2))/7)))*2)
else
WorkingDays:=ElapsedDays;
For i:=1 to NoPubHols Do
if PubHols in {transrpt.settle_dt} to {transrpt.mature_dt} then
Workingdays:= WorkingDays - 1;
Workingdays