cdennis321
MIS
Version 8.5
Database Oracle
I am working on a report that calculates the number of misses that an employee has. This report is a letter that is kicked out of the system if they have a miss entered on the current day. They cannot have 8 or more misses. One miss can come off of their record after for every 30 days they have worked (i.e. 60 days -2 misses, or 90 - 3 misses etc). I am able to calculate the misses and get the accurate count using a subreport and variables.
My problem is with displaying the missed dates on the letter. The formula that I am currently using to display the dates are as such (This allows me to display the dates across the page):
@resetdate = WhilePrintingRecords;
StringVar chain := '';
NumberVar ChCnt := 1
@calculate = WhilePrintingRecords;
StringVar Item:= totext({@Absence},"M/dd/yy");
StringVar Chain;
NumberVar ChCnt;
if {@Absence} <> previous({@Absence})
then
if ChCnt = 1
then (ChCnt:= 2; chain := Item)
else
if Length(Chain) + Length(Item) > 254
then Chain := Chain else
chain := chain + ', ' + Item
@displaystring = WhilePrintingRecords;
StringVar Chain
I want the letter to only show the missed dates that should be counted. For example, if they have a total of 5 missed dates and 2 are subtracted, then I want the letter to show only the last three missed dates.
If anybody has any ideas I will be truly grateful as this has had me stumped for quite some time.
CD
Database Oracle
I am working on a report that calculates the number of misses that an employee has. This report is a letter that is kicked out of the system if they have a miss entered on the current day. They cannot have 8 or more misses. One miss can come off of their record after for every 30 days they have worked (i.e. 60 days -2 misses, or 90 - 3 misses etc). I am able to calculate the misses and get the accurate count using a subreport and variables.
My problem is with displaying the missed dates on the letter. The formula that I am currently using to display the dates are as such (This allows me to display the dates across the page):
@resetdate = WhilePrintingRecords;
StringVar chain := '';
NumberVar ChCnt := 1
@calculate = WhilePrintingRecords;
StringVar Item:= totext({@Absence},"M/dd/yy");
StringVar Chain;
NumberVar ChCnt;
if {@Absence} <> previous({@Absence})
then
if ChCnt = 1
then (ChCnt:= 2; chain := Item)
else
if Length(Chain) + Length(Item) > 254
then Chain := Chain else
chain := chain + ', ' + Item
@displaystring = WhilePrintingRecords;
StringVar Chain
I want the letter to only show the missed dates that should be counted. For example, if they have a total of 5 missed dates and 2 are subtracted, then I want the letter to show only the last three missed dates.
If anybody has any ideas I will be truly grateful as this has had me stumped for quite some time.
CD