Home » Developer & Programmer » Reports & Discoverer » Pick up a picture in a report
Pick up a picture in a report [message #633098] Tue, 10 February 2015 22:54 Go to next message
amjad_alahdal
Messages: 92
Registered: October 2013
Location: Saudi Arabia
Member
Hello guys,
I have designed 6 card colors. I want to use them all in one report depending on the where condition.
I have the following table:
Employee_id Number,
Employee_name ,
Employee_dept_number
________________
I have 6 depts
from 1 to 6
In the report I want to pick up a picture depending on the employee_dept_number.
If the employee_dept_number is 1
the picture directory is for example
c:\orcle\1.bmp
if 2
c:\orcle\2.bmp
________________________
So far, I have build a report and I used a Link File. How can I program that link file to be as the following :
if dept_number = 1
then c:\orcle_\1.bmp
and so on..

thanks
Re: Pick up a picture in a report [message #633174 is a reply to message #633098] Thu, 12 February 2015 01:28 Go to previous messageGo to next message
m.abdulhaq
Messages: 233
Registered: April 2013
Location: Ajman
Senior Member
store that image in database as blob and then display it based on condition.

Re: Pick up a picture in a report [message #633212 is a reply to message #633174] Thu, 12 February 2015 06:10 Go to previous messageGo to next message
Littlefoot
Messages: 21267
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Forget about IF-THEN-ELSE, you don't need it. Everything can be done in report's query, such as
select employee_id,
       employee_name,
       employee_dept_number,
       --
       case when employee_dept_number = 1 then 'c:\orcle\1.bmp'
            when employee_dept_number = 2 then 'c:\orcle\2.bmp'
            ...
            when employee_dept_number = 6 then 'c:\orcle\6.bmp'
       end my_picture
from your_table


Set MY_PICTURE field's properties to
- Read from file: yes
- File format: image

Run the report, and you should see pictures.

P.S. Why BMPs? They are rather large. Why wouldn't you use JPGs instead?
Re: Pick up a picture in a report [message #633234 is a reply to message #633212] Thu, 12 February 2015 10:13 Go to previous messageGo to next message
amjad_alahdal
Messages: 92
Registered: October 2013
Location: Saudi Arabia
Member
Littlefoot ,,,
Well, I created a LINK Item. I tried that, but it didn't work.
I have no problem using bmp or jpg. it is a test program
what type of time should I use in the report layout?
The query is appears as texts

[Updated on: Thu, 12 February 2015 10:27]

Report message to a moderator

Re: Pick up a picture in a report [message #633253 is a reply to message #633234] Fri, 13 February 2015 00:39 Go to previous messageGo to next message
Littlefoot
Messages: 21267
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
A link item, and it didn't work? I wonder, why did I spend time to tell you what to do, if you just don't listen?
Re: Pick up a picture in a report [message #633257 is a reply to message #633253] Fri, 13 February 2015 02:10 Go to previous messageGo to next message
amjad_alahdal
Messages: 92
Registered: October 2013
Location: Saudi Arabia
Member
Because, You didn't understand my question.
Anyways, I am using oracle developer 6i.
There is no such property as "read file from".
I have something called "File sourcename" and I must pick up a picture.
If you know how to program the File sourcename to set it depending on the query please tell me.
If you don't, please don't bother answering my questions.
Re: Pick up a picture in a report [message #633258 is a reply to message #633257] Fri, 13 February 2015 02:49 Go to previous messageGo to next message
Littlefoot
Messages: 21267
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
amjad_alahdal

Anyways, I am using oracle developer 6i.


How is ANYONE supposed to know that? When creating a topic, you are asked to provide such an information. Why didn't you do that?

As I don't use 6i (never did), unfortunately, I wouldn't know what to say. Hopefully, someone else will assist (I know that many OraFAQ members who are located in India or Pakistan do use that version so - be patient).
Re: Pick up a picture in a report [message #633978 is a reply to message #633258] Mon, 02 March 2015 03:43 Go to previous messageGo to next message
shahzad-ul-hasan
Messages: 497
Registered: August 2002
Senior Member
see that picture and create formula column and set te file format i=image.
please advised./forum/fa/12507/0/
  • Attachment: 11.JPG
    (Size: 35.05KB, Downloaded 157 times)
Re: Pick up a picture in a report [message #664498 is a reply to message #633978] Thu, 20 July 2017 05:51 Go to previous message
amjad_alahdal
Messages: 92
Registered: October 2013
Location: Saudi Arabia
Member
Thank You littlefoot and shahzad-ul-hasan. It worked as you explained.
Previous Topic: Changing Field Font Type according to the text language
Next Topic: Account number not expend
Goto Forum:
  


Current Time: Sun Dec 17 08:59:20 CST 2017

Total time taken to generate the page: 0.02354 seconds