PDA

Click to See Complete Forum and Search --> : basic coding in CR_v8


2bRaistlin
Mar 25th, 2007, 11:41 AM
Hi i'm a total newbee to crystal report and some very basic stuff still isn't clear to me.

I created a new 'formula' (called"@check4null) and wanted to write this code:


shared zero as boolean

if ({caric.codana}) ="" then
zero = true
else
zero = false
end if


can someone explain me why i get a error message similar to "always have to assign a value to variable within the formula"?

i'm using CR v.8.0

Thank you so much! R.

brucevde
Mar 26th, 2007, 11:41 AM
When writing formulas using Basic Syntax you need to assign the return value of the formula via the special variable appropriately called Formula

shared zero as boolean

if ({caric.codana}) ="" then
zero = true
else
zero = false
end if

formula = zero