This Crystal Reports tip comes from the January edition of our GP Reports Viewer Newsletter. There are often times when a report is printed so that someone can go down the list and verify items or see where information may be missing. While it was a little more timely in January, at the time of the newsletter, confirming 1099 information is a good example of this.
To start, let’s say I have a report with a list of all my 1099 vendors:
What I am checking on this report is whether I have a Tax ID number and an address for each vendor, so I am going to create two formulas these:
taxid:
if {PM00200.TXIDNMBR} = ""
then Chr(168) else Chr(254)
and address:
if {PM00200.ADDRESS1} = ""
or {PM00200.CITY} = ""
or {PM00200.STATE} = ""
or {PM00200.ZIPCODE} = ""
then Chr(168) else Chr(254)
The important parts are in blue in the formulas above, these bring in the Wingdings character codes for a checked box if the condition specified is true and an empty checkbox if it is not true. You can use any characters you want for these, as long as you know what their code is. (More on this a little further down.)
Next step is to add two new columns to the report to show the taxid and address formulas, change the font for them to Wingdings and the font size to something larger (otherwise they will show up tiny). Here is the final result:
Note that vendor DOLECKIC0001 has an empty checkbox for the address, even though there is an address listed. That’s because in my formula I am checking for the ADDRESS1, CITY, STATE and ZIPCODE to all be there. If one of them is missing, I consider that an incomplete address. This is where you really see the power of the checkboxes, when quickly scanning the list it might look like all the addresses are there, however this way no list scanning or guesswork is needed.
To find codes for other characters you might want to use, I have found the following websites:
For more tips like this, sign up to receive GP Reports Viewer newsletters via e-mail or check out the newsletter archive on the Flexible Solutions website.
I am using below code , select({tb.Visit}) case “Business” :CHR(254) case “Transit” : CHR(254) default: CHR(168) But not getting check box . getting something like ‘P’ for chr(254) and ‘..’ for chr(168)
LikeLike
Umesh,
What font are you using?
-Victoria
LikeLike
Thanks good help for me
LikeLike