Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: A boolean is required Post Reply Post New Topic
Author Message
Eregnon
Newbie
Newbie


Joined: 11 Jun 2009
Online Status: Offline
Posts: 5
Quote Eregnon Replybullet Topic: A boolean is required
    Posted: 17 Jul 2009 at 12:28pm
I have an application  I inherited written in VB6 using crystal 9. There are some reports that, while working fine in the original production executable, give me the "A boolean is required" error when I try to run them in the development environment. I managed to trace one of them down and found it's occuring in this formula:
 
if {tblVendorControlFile.CHARTER_FLAG} = 1 then
"Charter"
else
"Non-Charter"
 
The editor states that the 1 should be a boolean value and when I change it to a boolean it does work. Note that this works fine in the installed version of the executable, but I'm getting the error in development, even though I have the same source code the original was compiled from.
 
The database backend is SQL 2005 and the data type of that field is bit.
 
Can anyone tell me what might be causing this?
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 20 Jul 2009 at 6:29am
bit fields in XI are treated as booleans.  It is either true or false.  I don't know about CR9, but it is probably just a change in how Crystal responds to the data type.  If you look in the database, the value is 1 or 0 for a bit field.
 
HTH
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.