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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying Images based on Condition 2

Status
Not open for further replies.

pgk

Programmer
Jul 19, 2002
262
US
Hi,
I have a report that is used to pictorially represent the skill set of the employees in a SW company. The report would look like:
C C++ VB Oracle Unix
Jacob Y N Y N N
John N N N Y Y
Rick Y Y N N N


I would like to display a tick mark and a cross in place of the Y and N respectively. I thought of using two picture boxes, one above the other, with the two images loaded and having a If then else formula determine which of the two picture boxes is to be made visible.

I believe you will get an idea as to what I am trying to do. I am using Crystal Reports 7 and Oracle 8i for the back end.

Thanks in advance for the forthcoming help mails and sorry for the long post. Hope it helps. Let me know what happens.
With regards,
PGK
 
How is your data stored? It will have an impact on the solution.

Do you have:
Employee table linked to a skills table
Employee table with a field for each of the skills
or something else?
Steve Phillips, Crystal Consultant
 
Dear PGK,

I don't know if Crystal 7.0 supported HTML formatting as I don't have access to it today - but if it does you can do this:

//formula
if {Table.myfield} = 1 //I am assuming a boolean!
then &quot;<font face = wingdings> ü&quot; //produces checkmark in box
else &quot;<font face = wingdings> ý&quot; //produces x in box
//end formula

Place field in report and right click - format field/paragraph formatting and choose HTML text.

Now, if 7.0 does not support HTML format, simply copy this:

//formula
if {Table.myfield} = 1 //I am assuming a boolean!
then &quot;ü&quot; //produces checkmark in box
else &quot;ý&quot; //produces x in box
//end formula

Right click field after placing on report, choose font and set to wingdings.

Play with it til you get the characters you want.

Of course, your original idea will also work, however the report will be very &quot;large&quot; with graphics.

Hope that helps.

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
Hi Steve,
My data is stored in a temp table for purpose of reporting.The structure is as below:

EmployeeId Number
C Varchar2(1) 'Will have a Y or N as value
C++ Varchar2(1)
VB Varchar2(1)
and so on.

Hi RoseMary,
I just returned from a vacation and haven't yet tried out your idea. Will let you know what happens

So folks sorry for the delay and thanks for your prompt replies.

Hope it helps. Let me know what happens.
With regards,
PGK
 
Whether you choose to display a graphic or the character symbol, the way to solve the problem is the same.

1. Place the employee name field in the details section along with the tick boxes.
2. Create a details b section and insert all the non-tick boxes there.
3. Format &quot;details a&quot; to 'underlay following section'.

Note: This will have the same effect as placing the two graphics on top of one another but it looks neater!

4. Format the tick boxes to be suppressed if ....

'C
not C = &quot;Y&quot;

'C++
not C++ = &quot;Y&quot;

etc.

5. Format the non-tick boxes to be suppressed if ....

'C
C = &quot;Y&quot;

'C++
C++ = &quot;Y&quot;

etc.

Steve Phillips, Crystal Consultant
 
Hi Steve,
I have gotten as far as setting up the picture boxes ( using the Insert Picture option ) i Detals a and b. What I do not know is the suppresion that you have suggested. How do you selectively suppress these picture boxes?

Sorry but I am new to this area. So kndly bear with me. Tahnks in advance. Hope it helps. Let me know what happens.
With regards,
PGK
 
Hi Steve,
Thanks for that excellent solution. I got it right by tampering around with it.

One more question: how do you set these picture boxes to the same size? I didn't across any format features for doing this. Any ideas would be most welcome. Thanks in advance. Hope it helps. Let me know what happens.
With regards,
PGK
 
Right Click on the graphic and choose &quot;format graphic&quot;, on the 'picture' tab you can set the Width and Height size.

I am using CRv8.5 so you may get slightly different options.

I would suggest you check the size of one of the graphics and set all the others to be the same as that. You have to set the size of each graphic individually. Steve Phillips, Crystal Consultant
 
Hi Steve and Rosemary,
I have tried your ideas and they both work fine. Thanks a lot and as a mark of my appreciation, I have given you both a star. Hope it helps. Let me know what happens.
With regards,
PGK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top