Thanks for your reply Howard,
I send the following message a couple of days ago, and got a reply that the declares were wrong. could you look at the problem and see if you can figure out why my client is getting this error.
Thanks so much for your help.
Joebait
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;
smeyer56 (IS/IT--Manageme) Mar 25, 2004
I tried it in 8.5 and it doesn't like your declarations and types. I don't see StringVar as an option in 8.5.
Try:
Dim sCol5Temp as string:
Dim sUnitPrice as string:
sUnitPrice = TrimLeft (TrimRight (ToText( cdbl({A.pk_unit_price}),"###,###,###.0000000000", 10)));