Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Correct Syntax, Error in Report Generation Post Reply Post New Topic
Author Message
fatyandao
Newbie
Newbie
Avatar

Joined: 19 Nov 2008
Location: Singapore
Online Status: Offline
Posts: 1
Quote fatyandao Replybullet Topic: Correct Syntax, Error in Report Generation
    Posted: 19 Nov 2008 at 10:16pm
Hi All,

I have encountered the following problem when generating the report in Java and have been stuck since.

The error I encountered was:
===========
START ERROR
===========
Error in formula <fbt>.
'WhilePrintingRecords;
'
The string is non-numeric.
===========
END ERROR
===========
===========
START FORMULA
===========
WhilePrintingRecords;
if {t_spinal_screening.fbt} = "p" then (
  Local NumberVar overall_deg;
  if IsNumeric({t_spinal_screening.atr_t_degree}) then
  (
    if ToNumber({t_spinal_screening.atr_t_degree})>overall_deg then
      overall_deg = ToNumber({t_spinal_screening.atr_t_degree});
  );
  if IsNumeric({t_spinal_screening.atr_l_degree}) then
  (
    if ToNumber({t_spinal_screening.atr_l_degree})>overall_deg then
      overall_deg = ToNumber({t_spinal_screening.atr_l_degree})
  );  
  if IsNumeric({t_spinal_screening.atr_tl_degree}) then
  (
    if ToNumber({t_spinal_screening.atr_tl_degree})>overall_deg then
      overall_deg = ToNumber({t_spinal_screening.atr_tl_degree})
  );
  if  overall_deg >=1 AND overall_deg <5 then
  (
    "Positive - For review";
  );
 if ( ToNumber({t_spinal_screening.atr_l_degree}) >=5) then
    "Positive - For re-assessment";
)
else
  if {t_spinal_screening.fbt} <> "" then "Negative" else ""
==========
END FORMULA
==========

t_spinal_screening.fbt - is a database text field, blank is allowed
t_spinal_screening.atr_t_degree - is a database text field, blank is allowed
t_spinal_screening.atr_t_degree - is a database text field, blank is allowed
t_spinal_screening.atr_t_degree - is a database text field, blank is allowed.


I am using Crystal Reports 9, and the syntax check says that there is no problems.

Will appreciate any help here. Thanks! :D


UPDATE:
-----------
Found the answer; it actually had to do with the statements below and their logic errors. God, without domain experts by my side, and as a beginner to Crystal Reports, it can be quite frustrating.

 if ( ToNumber({t_spinal_screening.atr_l_degree}) >=5) then

should be

 if ( overall_deg >=5) then


Edited by fatyandao - 20 Nov 2008 at 12:06am
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.