To get a employee images using BI report:
create data model:
Using the below query:
SELECT A.PERSON_NUMBER,
B.DISPLAY_NAME,
C.IMAGE
FROM PER_ALL_PEOPLE_F A,
PER_PERSON_NAMES_F B,
PER_IMAGES C
WHERE A.PERSON_ID = B.PERSON_ID
AND B.NAME_TYPE='GLOBAL'
AND A.PERSON_ID = C.PERSON_ID
AND TRUNC(SYSDATE) BETWEEN A.EFFECTIVE_START_DATE AND A.EFFECTIVE_END_DATE
AND TRUNC(SYSDATE) BETWEEN B.EFFECTIVE_START_DATE AND B.EFFECTIVE_END_DATE
AND C.PRIMARY_FLAG='Y'
AND A.PERSON_NUMBER IN (DECODE(:pn,'',A.PERSON_NUMBER,:pn))
For parameter use list of values:
SELECT DISTINCT A.PERSON_NUMBER FROM PER_ALL_PEOPLE_F A,PER_IMAGES C where A.PERSON_ID = C.PERSON_ID AND C.IMAGE IS NOT NULL ORDER BY PERSON_NUMBER
Create rtf template:
For image filed use the below tag:
<fo:instream-foreign-object content-type="image/jpg" height="3 in" width="4 in">
<xsl:value-of select="IMAGE"/>
</fo:instream-foreign-object>
Note:Above the IMAGE in red color is the filed name.
The output looks like below:
create data model:
Using the below query:
SELECT A.PERSON_NUMBER,
B.DISPLAY_NAME,
C.IMAGE
FROM PER_ALL_PEOPLE_F A,
PER_PERSON_NAMES_F B,
PER_IMAGES C
WHERE A.PERSON_ID = B.PERSON_ID
AND B.NAME_TYPE='GLOBAL'
AND A.PERSON_ID = C.PERSON_ID
AND TRUNC(SYSDATE) BETWEEN A.EFFECTIVE_START_DATE AND A.EFFECTIVE_END_DATE
AND TRUNC(SYSDATE) BETWEEN B.EFFECTIVE_START_DATE AND B.EFFECTIVE_END_DATE
AND C.PRIMARY_FLAG='Y'
AND A.PERSON_NUMBER IN (DECODE(:pn,'',A.PERSON_NUMBER,:pn))
For parameter use list of values:
SELECT DISTINCT A.PERSON_NUMBER FROM PER_ALL_PEOPLE_F A,PER_IMAGES C where A.PERSON_ID = C.PERSON_ID AND C.IMAGE IS NOT NULL ORDER BY PERSON_NUMBER
Create rtf template:
For image filed use the below tag:
<fo:instream-foreign-object content-type="image/jpg" height="3 in" width="4 in">
<xsl:value-of select="IMAGE"/>
</fo:instream-foreign-object>
Note:Above the IMAGE in red color is the filed name.
The output looks like below: