Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Bollean - Fill CheckBox Post Reply Post New Topic
Author Message
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Topic: Bollean - Fill CheckBox
    Posted: 15 Apr 2011 at 12:59am
Greetings,

I haven't used Crystal Reports in a looong time. Recently I started a new project. I am working on ASP.NET, via Microsoft Visual Studio 2010, and would like to know how can I use a boolean in order to fill a checkbox field.


I have the following fields: 

GENDER -  M []      F []

What I want is, if the value of the database field is MALE then it would X the M checkbox, if it was FEMALE then it would fill the F checkbox.

Would someone, please, explain it to me how can this be done?
Thanks in advance.



Edited by Goldberg - 15 Apr 2011 at 1:00am
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Quote lockwelle Replybullet Posted: 15 Apr 2011 at 3:22am
Brian has an example of this in his Cheat Sheet...I think.  What you do is print the graphic of an empty check box for false and checked for true...and as I recall, it is not the graphic, it is the using the ASCII code in Wingdings I think...
 
my reports don't get so 'fancy', just straight financials.  It's a simple trick, I just haven't used it so don't remember it fully.
 
HTH
IP IP Logged
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Posted: 15 Apr 2011 at 4:15am
well, yeah, I read about changing the bollean font to WingDing and use char(111) for unchecked and chr(254) for checked, but how do I make it check 1 box or the other?
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 15 Apr 2011 at 4:19am
you mkae 2 formula fields.
Each one displays a different box
for Female//
if {table.GENDER}='Female' then Chr(254) else Chr(168)
 
for Male//
if {table.GENDER}='Male' then Chr(254) else Chr(168)
IP IP Logged
Goldberg
Groupie
Groupie
Avatar

Joined: 15 Apr 2011
Location: Portugal
Online Status: Offline
Posts: 58
Quote Goldberg Replybullet Posted: 15 Apr 2011 at 5:28am
Done. Thanks, DBlank!
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.033 seconds.