Print Page | Close Window

Crystal 10 - help with Checkbox

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=1398
Printed Date: 03 May 2024 at 8:53pm


Topic: Crystal 10 - help with Checkbox
Posted By: lsalih
Subject: Crystal 10 - help with Checkbox
Date Posted: 27 Sep 2007 at 10:16am
Greetings -
 
I have an Oracle table, I am creating a Crystal form to dispay the values. The form requires having a checkbox to display if value is yes or no.
 
Could you please guide on how to create checkbox in Crystal report, and have it checked if the data value in the table is set to yes.
 
Thanks,
Lava



Replies:
Posted By: BrianBischof
Date Posted: 27 Sep 2007 at 11:07am
I have a tutorial on this on page 309 of my new book. Here is the formula you need:
if {table.field} = true then
   ChrW(254)
Else
    Chrw(168);

Drag and drop the formula onto your report and set the font to WindDings.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 27 Sep 2007 at 11:10am
Thank You Brain for your help, I will definitly get your new book. I will give a try now and see if it works.
 
Regards,
Lava


Posted By: BrianBischof
Date Posted: 27 Sep 2007 at 11:56am
Cool. I think you'll like the book. Tons of tips and tricks just like this one in every chapter.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 27 Sep 2007 at 12:02pm
How about another question? Just to see how good your book is ;)
 
The form I am working on, has to section. The first one has the persons  info which is simple to do, the second section has to list for each order, just as an example, list of all information related to it. For example, let's sat I have person X, person X has 20 orders. Each order, has Order date, type, price, etc. Section B, should display for each order, all the information associated with it.
You know how in Access, you have the main form has the data then you have the subform which will have detailed info for each record. Would you do so in Crystal as well. How would you keep the main section, and scroll to all orders in the other section.
 
Am I clear?
 
Thanks.
 


Posted By: lsalih
Date Posted: 27 Sep 2007 at 12:09pm
Cool, it worked GREAT...... THANKS A LOT.
 
Lava


Posted By: BrianBischof
Date Posted: 27 Sep 2007 at 12:15pm
Glad it worked!

Access and CR are very similar, but not quite. For your report I would create a group on PersonID and put the person info in the group header. Then in the Details section list the order info. That way, all orders for each person will be listed directly below that person. If necessary, you can right-click on any numeric field in the Details section and select Add Summary to show the totals in the group footer of each person.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: BrianBischof
Date Posted: 27 Sep 2007 at 12:16pm
Oh yeah - re the book, I've never used Oracle and thus have no tips and tricks for it. So some of the database chapters only applies to SQL Server. Nonetheless, 90% of it is standard optimization techniques and SQL queries that applies to all databases.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 27 Sep 2007 at 12:19pm
Brain - I used Order as an example, but the actual form is a state predesigned form that I have to follow. As I said, it has to section, the upper section is the personal info, and below is detailed section with one to many relationship. Since the form is predesigned, I have to use the same structure when I am building it in Crystal. The only thing I am not certain about how I will fit for each record all the info related under section B.


Posted By: lsalih
Date Posted: 27 Sep 2007 at 12:33pm
Typo - I meant two sections.


Posted By: BrianBischof
Date Posted: 27 Sep 2007 at 1:22pm
Well, I don't know how you will fit the info into the section b/c I don't know what the criteria are. Does it have to be an exact height or is there a valid range? Since there is more than one detail record, is there a restriction on how much space each record can use? I need more info on what you are having a problem with.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 27 Sep 2007 at 1:36pm
Brain - Regardless of where the data is coming from, could you please advise me on how to setup the report? My goal is to have section A fixed, while I can page through section B based on number of enteries I have for the perosn.
 
Lava
 


Posted By: BrianBischof
Date Posted: 27 Sep 2007 at 1:57pm
Ah! Now I see what you are doing. The key was "Section A fixed". So you want Section B to be scrollable while the Section A data is fixed like you can do in Excel and locking rows. Unfortunately, CR doesn't have this feature (what a let-down after all these posts). You could have Section A print at the top of each page by putting it in the Page Header section. That lets you still see Section A data as you move from page to page. But I'm thinking this probably isn't what you are looking for. You could make Section B an on-demand subreport so that the user can double-click on it and it opens Section B data in a new tab. Again, probably not what you want. But these are really the only options if I'm interpreting your question correctly.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 28 Sep 2007 at 11:10am
Brain - Thank you very much for your time.
 
The problem is that we have to have for each form, list of the detailed information about the person (Section A), and list of all related data for that person in Section B. The person might have 1 or many data based on his record. I believe that they need to have all data listed on a page, I am still waiting on a user for clarification. Also, they want to print the form, I assume list section A along with all information of section B.
 
Lava


Posted By: BrianBischof
Date Posted: 28 Sep 2007 at 11:19am
Ok, but so far this sounds like what I already discussed. 'Section A' will be the group header/footer using the Person Id as the group field. 'Section B' will be the Details section that lists the related data. Have you tried this yet? Give it a shot and see if it gets you what you need. And if you need each person on a separate page, use the Format Section option and click the option New Page After.

I think this should be what you need!

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 28 Sep 2007 at 11:30am
Brain - Is there a a way I can call you? It is easier for me to explain section B so you get a better idea.
 
Thanks,
Lava


Posted By: BrianBischof
Date Posted: 28 Sep 2007 at 11:38am
Sorry. I'm at work and calling wouldn't be good. Can you do a screen shot online and link to it or something?

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 28 Sep 2007 at 1:13pm

Brain - Lets say the green section is how my form should look l like. Under the green section, I have 2 more orders that I want to display as well. What is the best way to display all 3 orders. Is it clear now?

 
Section A          
           
           
Name ABC   Perosnal ID 123  
Address          
DOB  5-Dec   COB USA  
           
Section B          
           
Order Type Cloth   Order Date 1-Dec  
      Purchase Date    
           
Status New   Received? Y N N  
Order Type     Order Date 4-May  
      Purchase Date    
           
Status Closed   Received? Y N N  
Order Type     Order Date 6-Jul  
      Purchase Date 4-Apr  
           
Status Pending   Received? Y N Y  


Posted By: lsalih
Date Posted: 28 Sep 2007 at 1:15pm
Sorry, I didn't know how to attach a document, so I just copied/paste from Excel.


Posted By: BrianBischof
Date Posted: 28 Sep 2007 at 1:28pm
This is just a grouping report. Plain and simple. Have you tried to create a group on the Person Id yet?

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 28 Sep 2007 at 1:30pm
 I will give a try, and see what I get.
 
I just didn't know how you would get for each person list of all orders (example)


Posted By: BrianBischof
Date Posted: 28 Sep 2007 at 1:43pm
Just do what I said in a post a while back. It should all work out. But don't say that it doesn't work until you at least tried it and have and something to work with. 

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 28 Sep 2007 at 1:46pm
huh, u r a smart man :) OK, I won't post anything until I try it


Posted By: wattsjr
Date Posted: 01 Oct 2007 at 10:54am
Hi Brian,
 
In reading your post, I just had to go to my copy of your new book and read the rest of what you wrote on Checkboxes.  Now I have a couple of comments and questions.
 
Comments: 
 
1. Cool, I especially like the idea of using the phone symble instead of "PH:" or "Phone:" as a label next to the phone number.
 
2. You're right, converting to decimal from hex is a real pain.  So I built a quick spreadsheet using the "HEX2DEC" function to list all of the numbers (and their decimal equivalents) from 01 to FF. I printed it to a PDF, and now it's a quick look-up.
 
Questions:
 
1. Do you always have to use a three character decimal number? For instance, in converting envelope character (HEX 2A) to decimal, do you use Chr(42) or Chr(042)? It seems that I remember from the old "Alt + NumPad" days, that we always had to type three digits.
 
2. Is the Wingdings font resonably universal?  Or is there some chance of  it not being translated properly by some PC/Printer combinations?
 
Thanks.


-------------
-jrw


Posted By: BrianBischof
Date Posted: 01 Oct 2007 at 11:00am
Glad this has been helpful! For the ChrW() function, you don't need three digits. CR just looks at the raw decimal number when doing the conversion. Yeah, I think the Alt+Numpad required three digits, but that was a Windows hidden keystroke type of thing-a-ma-jib. 

I think Wingdings is a universal font for Windows. There might be some add chance that it doesn't get converted, but I would think that this would be for non-standard printers (bar code printers, dot matrix, etc.) Otherwise, I've never come across a problem.


-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: lsalih
Date Posted: 04 Oct 2007 at 1:10pm
Brain - I followed your recommendation by putting section A in the page header so it displays on each page, and put section B in detail section. I checked New Page after so for each record it prints on a new page. Now the last problem I have is that I can get data in new pages, but the format around it is not passing through. The Order section should be in a box, that box only shows on page 1, but the rest of pages only contain data.
 
I appreciate if you could assist me with that as well.
 
Thanks,
Lava



Print Page | Close Window