I am running a Crystal 10 report to a SQL database and get the following error when trying to run the report.I have noted 3 items below.
---------------------------
Crystal Reports
---------------------------
A number, currency amount, boolean, date, time, date-time, or string is expected here.
---------------------------
OK
---------------------------
1. It looks like it is referencing a formula called InitJurisFormationFromList
The formula has the below:
shared stringVar array jurisFormationList;
jurisFormationList := getJurisdictionInfoList({?$DATABASEID$});
2. There's another formula in the report called getJurisFormationFromList
This formulas has the below:
shared stringVar array jurisFormationList;
shared stringVar inEid;
Local stringVar jurisFormation := "";
Local stringVar item;
Local numberVar i;
Local numberVar j;
Local numberVar listLength := Count(jurisFormationList);
Local stringVar midChar;
Local numberVar pos;
Local stringVar listEid;
Local numbervar lbeg;
Local numbervar lend;
Local numbervar lon;
Local numbervar keepGoing;
Local stringvar tmpStr;
Local numbervar tmpId;
Local numbervar myid;
local numbervar storedvar;
local numbervar iterCount;
lbeg:=1;
lend:=listLength;
lon:=int( (lend -1)/ 2) + 1;
keepGoing := 0;
myId := ToNumber(inEid);
iterCount := 0;
while keepGoing = 0 and iterCount < 24 do
(
iterCount := iterCount + 1;
//added the redim
redim preserve jurisformationlist[1000];
item := jurisFormationList[lon];
j:=0;
tmpStr := "";
tmpId := 0;
while j<length(item) and tmpStr = "" do
(
j := j + 1;
midChar := Mid(item, j, 1);
if midChar = "~" then
(
tmpId := ToNumber (Left(item,j-1));
tmpStr := Right(item,Length(item)-j);
);
);
storedvar := tmpId;
if myId = storedvar then
(
keepGoing := 1;
jurisFormation := tmpStr;
);
if myId < storedvar then
(
if lend = lbeg then
(
keepGoing := 1;
jurisFormation := "";
);
if lend<>lbeg then
(
lend := lon;
lon := int( (lend- lbeg) /2) + lbeg;
);
);
if myId > storedvar then
(
if lend = lbeg then
(
keepGoing := 1;
jurisFormation := "";
);
if lend <> lbeg then
(
lbeg := lon;
lon := int( (lend- lbeg) /2) + lbeg;
);
)
);
jurisFormation;
//if jurisFormation = '(jurisdiction not found)' then ' ' else jurisFormation;
3. There is another formula in the report called Jurisformation.
It has the below it its formula:
Shared stringVar array jurisFormationList;
Shared stringVar inEid;
inEid := CStr({ENTITY.Entity_EID},0,"");
{@getJurisFormationFromList};
Let me know if you need any other info. There are more formulas(4) in the report.
---------------------------
Crystal Reports
---------------------------
A number, currency amount, boolean, date, time, date-time, or string is expected here.
---------------------------
OK
---------------------------
1. It looks like it is referencing a formula called InitJurisFormationFromList
The formula has the below:
shared stringVar array jurisFormationList;
jurisFormationList := getJurisdictionInfoList({?$DATABASEID$});
2. There's another formula in the report called getJurisFormationFromList
This formulas has the below:
shared stringVar array jurisFormationList;
shared stringVar inEid;
Local stringVar jurisFormation := "";
Local stringVar item;
Local numberVar i;
Local numberVar j;
Local numberVar listLength := Count(jurisFormationList);
Local stringVar midChar;
Local numberVar pos;
Local stringVar listEid;
Local numbervar lbeg;
Local numbervar lend;
Local numbervar lon;
Local numbervar keepGoing;
Local stringvar tmpStr;
Local numbervar tmpId;
Local numbervar myid;
local numbervar storedvar;
local numbervar iterCount;
lbeg:=1;
lend:=listLength;
lon:=int( (lend -1)/ 2) + 1;
keepGoing := 0;
myId := ToNumber(inEid);
iterCount := 0;
while keepGoing = 0 and iterCount < 24 do
(
iterCount := iterCount + 1;
//added the redim
redim preserve jurisformationlist[1000];
item := jurisFormationList[lon];
j:=0;
tmpStr := "";
tmpId := 0;
while j<length(item) and tmpStr = "" do
(
j := j + 1;
midChar := Mid(item, j, 1);
if midChar = "~" then
(
tmpId := ToNumber (Left(item,j-1));
tmpStr := Right(item,Length(item)-j);
);
);
storedvar := tmpId;
if myId = storedvar then
(
keepGoing := 1;
jurisFormation := tmpStr;
);
if myId < storedvar then
(
if lend = lbeg then
(
keepGoing := 1;
jurisFormation := "";
);
if lend<>lbeg then
(
lend := lon;
lon := int( (lend- lbeg) /2) + lbeg;
);
);
if myId > storedvar then
(
if lend = lbeg then
(
keepGoing := 1;
jurisFormation := "";
);
if lend <> lbeg then
(
lbeg := lon;
lon := int( (lend- lbeg) /2) + lbeg;
);
)
);
jurisFormation;
//if jurisFormation = '(jurisdiction not found)' then ' ' else jurisFormation;
3. There is another formula in the report called Jurisformation.
It has the below it its formula:
Shared stringVar array jurisFormationList;
Shared stringVar inEid;
inEid := CStr({ENTITY.Entity_EID},0,"");
{@getJurisFormationFromList};
Let me know if you need any other info. There are more formulas(4) in the report.