Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error: "the ) is missing"

Status
Not open for further replies.

VanDamme

Programmer
Feb 18, 2002
5
AR
2nd. request:
I´m sorry I forgot to tell you first time formulas were checked, and it are correct.
Main problem is that the development was made under Crystal 7.0, and now we remade it with Crystal 8.5. The problem become solved if I install Crystal 8.5 package in the machine where I install my application package. So, what I don´t know is what file or DLL is Crystal installing or registering to make it work.
Crystal documents doesn´t talk about it.
Thanks to people who answered!!! VANDAMME
 
please cut and paste your formula to this thread (not another new one) and there are several people here that can help. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Here are the formulas you asked for:(Crystal syntax)
Formula 1:
name: @F_BRUTO
WITH CRYSTAL SYNTAX:
if Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'PAGAMENTO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'PAPA-FILA' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'VIOLAÇAO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'PASSE MAIS' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'CARTÃO SEM CONT' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'VALE PEDAGIO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'GRANDE USUARIO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'ISSENTO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'BONIF 50%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'BONIF 75%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'BONIF 90%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'BONIF 25%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'BONIF. ENCANTADO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'BONIF. VAR FARROU' then ({ado.BRUTO} - {@F_ISENTO})
else 0
*************
FORMULA 2
NAME:mad:F_CALCULADO
WITH CRYSTAL SYNTAX:
if Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='PAGAMENTO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='PAPA-FILA' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='PASSE MAIS' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='VALE PEDAGIO' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='BONIF 50%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='BONIF 75%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='BONIF 90%' or
Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE}))='BONIF 25%' then {ado.TOTAL}
else 0

*********
FORMULA 3
NAME: @F_ISENTO
WITH CRYSTAL SYNTAX:
IF TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'AMBULANCIA' OR
TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'BOMBEIRO' OR
TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'POLICIA RODOVIARIA' OR
TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'POLICIA CIVIL' OR
TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'OFICIAL - MUNICIPIO' OR
TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'FORCAS ARMADAS' OR
TRIM({ado.DESCRIPTION_OPERATION_TYPE}) = 'POLICIA MILITAR' THEN {ado.BRUTO}
ELSE 0
*********
FORMULA 4
NAME: @F_MONEDA
WITH CRYSTAL SYNTAX:
'(' + Trim ({ado.SYMBOL}) + ') ' + Trim ({ado.NAME})

*************
FORMULA 5
NAME: @F_TEORICO
WITH CRYSTAL SYNTAX:
if Trim(Ucase({ado.DESCRIPTION_OPERATION_TYPE})) = 'CONCESSIONARIA' then {ado.BRUTO}
else 0

****************
 
I see nothing at all wrong with any of these formulas. Very strange. I have 2 ideas however. When you get the error, is your cursor placed anywhere in particular? If so try re-writing that part of the code.

Change all of your single quotes to double quotes. I have heard of people having problems with single quotes in formulas before. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Dgillz:
Thank you for your help. We tried with double quotes without success. Same error appear in the second machine where distribution package is installed. Let me remind you the error doesn´t exists when running into the Vb environment (development PC), it happens only in the runtime on the second machine. And it started to happen when we moved from Crystal 7.0 to 8.5.
We tried to rewrite formulas with Vb syntax also, with same error.
Do you know which DLLs has Crystal associated to CrViewer work?. I can´t believe no one had this problem before.
thank you in advance.
 
That message will also occur if a function doesn't exist, and I am suspicious of Ucase. I think that is one of those functions that exists in an added DLL. Try replacing all UCASE() with UpperCase() which is a standard function. See if that helps. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top