Crystal is great for doing quick little reports that look reasonably neat. Use the
Report Expert at first, until you have a clearer idea of what the language does.
The set-up for Formula Fields gives you a set of useful commands, but unfortunately not all of them. Reading this forum will give you a lot of extras.
Having come to Crystal from mainframe languages, I got a 'cultural shock' when encountering null. It means 'no data': Mainframe languages mostly treat this as the same as zero.
It is actually a finer shade of meaning, the difference between 'Yes, we have no bananas' and 'I don't know how many bananas we have, it could be some, it could be zero'. In Crystal, the entry is 0 or null and can be tested for.
Note that Crystal assumes that anything with a null means that the field should not display. Always begin with something like
Code:
if isnull({your.amount}) then 0
else {your.amount}
or
Code:
if isnull({your.date})
or {your.date} in [{Start-Date} to {End-Date}) then "OK"
else "not"
Or else
Code:
if isnull({your.amount})
then "no value found"
else ToText({your.amount})
The 'ToText' allows you to mix numbers and text, and also has interesting format options.
You'll also discover that Crystal is a reporting tool, which allows you to produce neat-looking reports very quickly. It isn't a full programming language, though it does include a lot of options that you can control in a subtle way.
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)
Madawc Williams (East Anglia, UK)
![[yinyang] [yinyang] [yinyang]](/data/assets/smilies/yinyang.gif)