Home » Developer & Programmer » Reports & Discoverer » Oracle Reports 6i - Displaying Images for each field value
Oracle Reports 6i - Displaying Images for each field value [message #89635] Tue, 08 June 2004 17:13 Go to next message
Nishant Gupta
Messages: 1
Registered: June 2004
Junior Member
hello

I have created a query in Oracle Reports 6i with two fields. One field is Name (Person's Name), the other field indicates the 'Skill Level' (the value can be 1,2,3,4). Now when the report displays, in addition to printing the 'Skill Level' i want to display an image based on what value is in 'Skill Level'. So if the 'Skill Level' value is 1, then image1 will display. If the 'Skill Level' value is 2, then image2 will display and so on and so forth.  Now in the report, i have 3 fields. One for Name, second for 'Skill Level', third for 'Skill Level' Image(an OLE2 Object). the source images are located on my desktop. So there should be PL/SQL code which looks at each  'Skill Level' value as it is read and assign the OLE2 Object the appropriate image from the desktop.

thanks

 
Re: Oracle Reports 6i - Displaying Images for each field value [message #115557 is a reply to message #89635] Tue, 12 April 2005 11:39 Go to previous messageGo to next message
thunuguntla
Messages: 1
Registered: April 2005
Junior Member
Hello,

I have the same problem, if you have solution for below issue please reply back ASAP.

Advance Thanks
Rama



hello

I have created a query in Oracle Reports 6i with two fields. One field is Name (Person's Name), the other field indicates the 'Skill Level' (the value can be 1,2,3,4). Now when the report displays, in addition?to printing the 'Skill Level' i want to display an image based on what value is in 'Skill Level'. So if the 'Skill Level' value is 1, then image1 will display. If the 'Skill Level' value is 2, then image2 will display and so on and so forth.? Now in the report, i have 3 fields. One for Name, second for 'Skill Level', third for 'Skill Level' Image(an OLE2 Object). the source images are located on my desktop. So there should be PL/SQL code which looks at each? 'Skill Level' value as it is read and assign the OLE2 Object the appropriate image from the desktop.

thanks

?
Re: Oracle Reports 6i - Displaying Images for each field value [message #115560 is a reply to message #89635] Tue, 12 April 2005 12:03 Go to previous message
Steve Corey
Messages: 336
Registered: February 2005
Location: RI
Senior Member
Is this a Forms or Reports question?

If it is Reports, then you don't need OLE. You can import the images via File --> Import --> Image and following the on-screen guide. You can also copy and paste an image into Reports from other reports or Word documents.

In order to solve your problem you would write a format trigger. First, import all your images and stack them up on top of each other. For each picture write the following PL/SQL in the FORMAT TRIGGER program unit (this will return a boolean (TRUE OR FALSE) value):

IF :SKILL_LEVEL = 1 THEN
 return (TRUE);
ELSE
 return (FALSE);
END IF;


Note: The above would be the format trigger for the image you would want to display when the skill level is 1. Do this for the rest and you should achieve the results you want. Be careful of the placement of the images and make sure they are surrounded by the appropriate frames!

HTH,
Steve
Previous Topic: Error for report on view
Next Topic: How to call Oracle Reports from ASP code
Goto Forum:
  


Current Time: Thu May 16 23:00:25 CDT 2024