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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot interpret an error message

Status
Not open for further replies.

harrietohs

IS-IT--Management
Apr 26, 2002
99
CA
Crystal 8.5
I have a report that works on all but 3 systems. Those 3 systems have one thing in common: they all have Adagio software installed. The error message is:

Error in formula <Variance Value>. 'numberVar Var =?' A variable name is expected here.

The formula it is referring to is:
numberVar Var :=
if {animal.animal_type} in "CAT" and {animal.sex} in "F" then {@Variance #} * 62.38 else
if {animal.animal_type} in "DOG" and {animal.sex} in "F" then {@Variance #} * 90.74 else
if {animal.animal_type} in "CAT" and {animal.sex} in "M" then {@Variance #} * 39.70 else
if {animal.animal_type} in "DOG" and {animal.sex} in "M" then {@Variance #} * 56.71;
shared numberVar RT := rt + var;
var;

The same 3 machines are able to run all of the other Crystal reports.

Anyone have any idea why these 3 systems are getting this error?

Thanks,

Harriet Farmer
Ottawa Humane Society
 
I'd guess that Var is your culprit, try renaming the variable.

At a glance, it appears that Adiago has ma proprietary use of Crystal, and in general, using VAR as a name of a variable is bad form, as it doesn't help to describe what it is, use something meaningful.

-k
 
Try prefixing formulas where you're using variables with "WhilePrintingRecords". The order of formula processing in your clients is probably off because you aren't taking control of them.

Either you have copied the error message down incorrectly, or it seems that the error is coming from a different formula, as you don't test the value of 'var' here (=), only assign it :)=).

Naith
 
Thanks for all the suggestions, tried them but no change.
I did copy the error message correctly, except I see there is a ? where the message actually shows a thick vertical line.

I did not write this formula, and I am not yet up to speed on variables, so I don't quite understand the purpose of that part of the formula. I do know that the report works fine on machines that run it, so don't want to tweak it too much until I have a better understanding of what the numbervar does. (I plan to do some research in the manual or on line.) I have found that Adagio has caused dll problems in the past, and perhaps this is really a dll problem in disguise?

Harriet
 
numbervar is just a placeholder for a numeric data type.

If you tried it without using VAR (which I usspected is a reserved word), then I don't have any other good guesses.

Contact them, perhaps they have some proprietary DLLs involved that are causing problems.

-k
 
Hi,
Try this:
Code:
numberVar Test ;
if {animal.animal_type} in "CAT" and {animal.sex} in "F" then 
Test := {@Variance #} * 62.38
 else
if {animal.animal_type} in "DOG" and {animal.sex} in "F" then 
Test := {@Variance #} * 90.74 
else
if {animal.animal_type} in "CAT" and {animal.sex} in "M" then 
Test := {@Variance #} * 39.70
 else
if {animal.animal_type} in "DOG" and {animal.sex} in "M" then
Test :=  {@Variance #} * 56.71;
shared numberVar RT := rt + Test;
Test;



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Thanks again for all the suggestions. I finally decided to rewrite the report using formula structures I better understood and avoided using variables. It works fine and is no longer a problem on the Adagio systems.

Just for interest, I have contacted the Adagio tech folks for their take on why this happened. If I hear back,I will add to this thread.

Harriet Farmer
Ottawa Humane Society
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top