Hi
I have the below formula:
WhilePrintingRecords;
local stringvar marks:={NEW_BASE_TIME.TERM_TEXT};
local numbervar A;
local stringvar display;
local numbervar iloop;
local numbervar startpos;
local numbervar endpos;
//start position of slice of string required
if {NEW_BASE_TIME.START_DATE} >= {?Start Date} or
{ROUTE_COST.START_DATE} >= {?Start date} then startpos := 1 else startpos := ({?Start Date} - {NEW_BASE_TIME.START_DATE})+1;
//end position of slice of string required
endpos:={@datediff};
//marks required
marks := mid({NEW_BASE_TIME.TERM_TEXT},startpos,endpos);
//assign each mark to appropriate counter
for iloop := 1 to len(marks) do
(
if uppercase(mid(marks,iloop,1))="A" then A := A +1
);
A
When I run the report, I am getting String length is less than 0 or not an integer on
mid({NEW_BASE_TIME.TERM_TEXT},startpos,endpos)
Can someone let me know what I have missed out please?
Thank you.
Lin
I have the below formula:
WhilePrintingRecords;
local stringvar marks:={NEW_BASE_TIME.TERM_TEXT};
local numbervar A;
local stringvar display;
local numbervar iloop;
local numbervar startpos;
local numbervar endpos;
//start position of slice of string required
if {NEW_BASE_TIME.START_DATE} >= {?Start Date} or
{ROUTE_COST.START_DATE} >= {?Start date} then startpos := 1 else startpos := ({?Start Date} - {NEW_BASE_TIME.START_DATE})+1;
//end position of slice of string required
endpos:={@datediff};
//marks required
marks := mid({NEW_BASE_TIME.TERM_TEXT},startpos,endpos);
//assign each mark to appropriate counter
for iloop := 1 to len(marks) do
(
if uppercase(mid(marks,iloop,1))="A" then A := A +1
);
A
When I run the report, I am getting String length is less than 0 or not an integer on
mid({NEW_BASE_TIME.TERM_TEXT},startpos,endpos)
Can someone let me know what I have missed out please?
Thank you.
Lin