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

Compiled report-getting error in formula

Status
Not open for further replies.

denisemathieu

Technical User
Oct 29, 2001
36
US
i have a report with the following selection criteria:
if {RM00103.CUSTBLNC} = 0.00 then datediff(&quot;d&quot;,RM00103.LSTTRXDT},currentdate)<14 else {RM00103.CUSTBLNC} > 0.00

it works great when i run the report. but when i compile the report and run it from the exe version, i get the following error: error in formula <record_selection>. 'if {RM00103.CUSTBLNC} = 0.00 then datediff(&quot;d&quot;, {RM00103.LSTTRXDT},currentdate)<14 else {RM00103.CUSTBLNC} > 0.00'
A number, currency amount, boolean or string is expected here.

the compiled report was running fine until today. they run this report everyday. so i don't know if it has something to do with the way it's compiled and today's date. any clues?
 
Are you running the compiled report on the same machine? Just a stab in the dark but If I recall correctly datediff is a UFL and the UFL must be registered on the machine that is executing the report. Any new machine would not automatically have this file. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
is it possible than {RM00103.CUSTBLNC} can be NULL...there is no test for this
 
to answer dgillz, it's always ran on the same machine. to answer ngolem, in the report options, i have 'convert null field value to default' checked. that should take care of a null if it exists.
 
i've narrowed it down to the formula:
datediff(&quot;d&quot;,currentdate,{rm00103.lsttrxdt})
where lsttrxdt is a date field.
it works fine in the report but not in the compiled version. i get a an error of: the remaining text does not appear to be part of the formula.
 
Where is the cursor when you get this error message?

Check to make sure the last argument is a number and not text. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
it doesn't display the cursor in the error. and i did check to see what results i was getting and they are numbers. it has to be something with the compiler.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top