Sunday, March 25, 2012

Crystal Syntax Problem

I have created a Crystal Report with a section that needs to be suppressed when there is no data. I used an "if then else" statement using the basic syntax of Crystal on the suppress control option of a textbox.

The code is as follows:

if {GetData;1.Complaint} = "" then
formula = True
else
formula = false
end if

Most of the time it works just fine, however on occasion I get the following error:

Error in formula <Object_Visibility>.
if {GetData;1.Complaint} = "" then

Exception Target Site: []N

I am not sure what causes this error. As a note this Report is used in conjuction with Sql Server and a VB.NET application. Any help given is greatly appreciated.Make sure that the condition does not return null value|||It could return a null value. What can I do in the Crystal Report to account for that? Any help given is greatly appreciated.|||Try this

if {GetData;1.Complaint} = "" or isnull({GetData;1.Complaint}) = True then
formula = True
else
formula = false
end if|||It still gave me the same error. Not sure what to do. Any theories?sql

No comments:

Post a Comment