I have batted this report around all week w/o getting it to work. What I have is a DB table w/ IDCODES (string).
The IDCODES can be 1000 - 9999. However the assignment numbers are randomly made and are not in the field called "IDCODE" until entered.
Thus, there are missing numbers in the sequence. I'm trying to find the missing numbers and print them out as a second Detail line. I inserted the EvaluateAfter() hoping it would help me get what I want.
Here is a sample of the data:
1000
1001
1002
1003
1004
1005
1006
1009
Select Recode is {IDCodes.IDCode} = "";
The sequence of the formula(s):
@Differance Note:The -1 is to make the unassigned
IDCODES the correct value.
EvaluateAfter({IDCodes.IDCode});
NumberVar Differance;
ToNumber(next({IDCodes.IDCode})) - ToNumber ({IDCodes.IDCode})-1;
===========
@CODEX
EvaluateAfter({@Differance});
If {@Differance} > 1 then
ToNumber ({IDCodes.IDCode})
else 0;
=============
@Increment
EvaluateAfter({@Codex});
Numbervar Array IdCode;
While {@Differance} > 1
Do ( Redim IdCode [{@Differance}];
(IdCode[{@Differance}]) = ({@Codex} + 1);
({@Codex}) = ({@Codex} + 1);
({@Differance}) = ({@Differance} - 1)
================
@Unassigned IDCODES
EvaluateAfter({@Increment});
Numbervar Array IdCode;
If {@Differance} > 1 then
While {@Differance} > 1
Do (ToText (IdCode [{@Differance}] + CHR (13));
=============================================================
The output on the 2nd Detail line:
Unassigned IDCODES: ====> 1007 1008 for example.
What I get in on the 2nd line is:
@differance = 2, @CODEX = 0
@Increment = True Unassigned IDCODES = 0
The IDCODES can be 1000 - 9999. However the assignment numbers are randomly made and are not in the field called "IDCODE" until entered.
Thus, there are missing numbers in the sequence. I'm trying to find the missing numbers and print them out as a second Detail line. I inserted the EvaluateAfter() hoping it would help me get what I want.
Here is a sample of the data:
1000
1001
1002
1003
1004
1005
1006
1009
Select Recode is {IDCodes.IDCode} = "";
The sequence of the formula(s):
@Differance Note:The -1 is to make the unassigned
IDCODES the correct value.
EvaluateAfter({IDCodes.IDCode});
NumberVar Differance;
ToNumber(next({IDCodes.IDCode})) - ToNumber ({IDCodes.IDCode})-1;
===========
@CODEX
EvaluateAfter({@Differance});
If {@Differance} > 1 then
ToNumber ({IDCodes.IDCode})
else 0;
=============
@Increment
EvaluateAfter({@Codex});
Numbervar Array IdCode;
While {@Differance} > 1
Do ( Redim IdCode [{@Differance}];
(IdCode[{@Differance}]) = ({@Codex} + 1);
({@Codex}) = ({@Codex} + 1);
({@Differance}) = ({@Differance} - 1)
================
@Unassigned IDCODES
EvaluateAfter({@Increment});
Numbervar Array IdCode;
If {@Differance} > 1 then
While {@Differance} > 1
Do (ToText (IdCode [{@Differance}] + CHR (13));
=============================================================
The output on the 2nd Detail line:
Unassigned IDCODES: ====> 1007 1008 for example.
What I get in on the 2nd line is:
@differance = 2, @CODEX = 0
@Increment = True Unassigned IDCODES = 0