Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Variable Not Defined?
KSReynolds
<p>I have defined a variable:</p>
<p>($F[main_was_rejected] != <b>null</b>) && ($F[main_was_rejected].equals("Yes")) ? Boolean.TRUE : Boolean.FALSE</p>
<p>It is named "wasrejected"</p>
<p>I get no syntax error.</p>
<p> </p>
<p>In my report, I have defined several fields that attempt to use this variable, for instance:</p>
<p> </p>
<p>($V[wasRejected] == Boolean.TRUE) ? $F[main_rejection_reason] :</p>
<p>($F[main_Asbestos_Detected] == Boolean.TRUE) ? "Yes" : "No"</p>
<p> </p>
<p>I get no syntax error.</p>
<p> </p>
<p>I debug my report; nothing happens so I assume there are no errors.</p>
<p>I view my report. That is when it all falls apart</p>
<p> </p>
<p>There is a non-fatal error. There are errors evaluating script.</p>
<p>"$F[main_was_rejected]!=null && :</p>
<p> ($F[main_was_rejected].equals("Yes")) ? Boolean.TRUE : Boolean.FALSE":</p>
<p>ReferenceError: "$F" is not defined. (<inline> #1) (ElementID: #1)</p>
<p> </p>
<p>I run my dql datasource in SQL manager and get results, so I know my datasource is okay. Why is it telling me "$F" is not defined?</p>
<p> </p>
<p>Thank you.</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
Find more posts tagged with
Comments
JFreeman
<p>What version of BIRT are you using?</p>
<p> </p>
<p>I do not see in your code where you have defined "$F".</p>
<p>Is this part of a third part package/JS file you are wanting to use?</p>
<p> </p>
<p>Can you attach a sample report that demonstrates this issue?</p>