Hi,
I need some help.
I have a report written in CR8 using a VB6 application. When one of our clients run the report
using cr8.5 he is getting the following error.
Error in formula <column5>
'//*********************************************************************************//'
the ) is missing
Below is the code in formula column5.
This works fine using CR8. I can't find anything wrong with the code. We don't have
CR8.5 so I can't test it to see what the problem is.
Any help will be greatly appreciated
Thank for your help
JoeBait
//**********************************************************************************//
//
// This field displays the data for the field chosen for this column...
//
//***********************************************************************************//
Stringvar sCol5Temp;
Stringvar sUnitPrice := TrimLeft (TrimRight (ToText( cdbl({A.pk_unit_price}),"###,###,###.0000000000", 10)));
NumberVar LengthToDecimal;
if {@DisplayOpt} [1] = "1" then
LengthToDecimal := instr(sUnitPrice, ".");
while (right(sUnitPrice, 1) = "0" and (len(sUnitPrice) > LengthToDecimal + 2)) Do sUnitPrice := Left(sUnitPrice, len(sUnitPrice) - 1);
if cdbl(sUnitPrice) = 0 then
sCol5Temp := ""
Else
sCol5Temp := Replace (sUnitPrice," ",chr(0));
if {@DisplayOpt} [1] = "2" then
if {@MarketValue} = 0 then
sCol5Temp:= ""
else
sCol5Temp:=ToText ({@MarketValue},2);
if {@DisplayOpt}[1] = "3" then
sCol5Temp:=ToText ({A.pk_price_date});
sCol5Temp;
I need some help.
I have a report written in CR8 using a VB6 application. When one of our clients run the report
using cr8.5 he is getting the following error.
Error in formula <column5>
'//*********************************************************************************//'
the ) is missing
Below is the code in formula column5.
This works fine using CR8. I can't find anything wrong with the code. We don't have
CR8.5 so I can't test it to see what the problem is.
Any help will be greatly appreciated
Thank for your help
JoeBait
//**********************************************************************************//
//
// This field displays the data for the field chosen for this column...
//
//***********************************************************************************//
Stringvar sCol5Temp;
Stringvar sUnitPrice := TrimLeft (TrimRight (ToText( cdbl({A.pk_unit_price}),"###,###,###.0000000000", 10)));
NumberVar LengthToDecimal;
if {@DisplayOpt} [1] = "1" then
LengthToDecimal := instr(sUnitPrice, ".");
while (right(sUnitPrice, 1) = "0" and (len(sUnitPrice) > LengthToDecimal + 2)) Do sUnitPrice := Left(sUnitPrice, len(sUnitPrice) - 1);
if cdbl(sUnitPrice) = 0 then
sCol5Temp := ""
Else
sCol5Temp := Replace (sUnitPrice," ",chr(0));
if {@DisplayOpt} [1] = "2" then
if {@MarketValue} = 0 then
sCol5Temp:= ""
else
sCol5Temp:=ToText ({@MarketValue},2);
if {@DisplayOpt}[1] = "3" then
sCol5Temp:=ToText ({A.pk_price_date});
sCol5Temp;