Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drawing a checked checkbox on a report 1

Status
Not open for further replies.

sodakotahusker

Programmer
Mar 15, 2001
601
I am trying to convert some Access reports to dot.net using Crystal. On of the forms, there is a checkbox under several options with one of them being checked. For example - payment type Cash COD Check Credit Card

It is easy to draw the empty boxes on the report. But at run time I need to change one of them to one that is checked. I thought maybe I could dynamically draw lines in the box - or maybe insert the ASCII character which is a checkbox (I've used that trick in the past but in this case it probably won't match the size of the empty boxes?). Can anyone give me some advice on how to do this? Thanks!!
 
You could either use formulas like the following formatted to HTML text:

if {table.paymenttype} = "Cash" then
chr(254)
else chr(168)

Or create conditional formulas like:

if {table.paymenttype} = "Cash" then
"X"

...and place the formula in a text box which is formatted to show a single line for each border.

-LB
 
I should have thought of the bordered textbox. Actually I could not find a way to assign a formula to a textbox so I formulated the data in the stored procedure. Works like a champ. Thanks!!!
 
You would just drag the formula into the textbox until it "snaps" into place. Then you can use the text justification icons to center the "X".

-LB
 
Re: my earlier post, the formula using chr() needs the font to be formatted to "wingding".

-LB
 
Thanks LB, that's just what I needed. Star for you.

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top