Skip to main content

How to add employee picture in report using IFS developer studio/IFS report designer tool??

Hi @Waqar Habib ,

in Report Designer you can use Database stored image.

https://docs.ifs.com/techdocs/Foundation1/050_development/025_operational_reporting/050_layout_design/020_layout_design/100_working_with_images/default.htm#:~:text=Working%20with%20images%20stored%20in%20database

Select must be from VIEW and column must be BLOB.

In your case should be used this:

SELECT data FROM BINARY_OBJECT_DATA_BLOCK where blob_id = Person_Info_API.Get_Picture_Id('IFSUSER');

 

It can be also used for static image stored inside of RDL, with usage of select from dual.

You can transform image into Base64 (for example with https://www.base64-image.de/) and then use:

select to_blob(UTL_ENCODE.base64_decode(UTL_RAW.cast_to_raw('iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAA21BMVEUAAAA/UbVAUbRAUrVBULRBUrZCU7VDULFFUK9FVrdFV7dHUK5IWrhLUKpMXrlPYLpQT6VST6NUZLtZTp1Zab1bbL5fTZZicr9jTZNqecJrTItse8JygMR0S4N8isd9S3p/SnmGk8qMSW2Qnc2ZR2GaptClR1SlsdSos9SvuteyRUi2wdi4RUO5w9m/ydvDQznFz9zH0N3L1N7NQi/P2N/R2ODT2+HV3eHV3uHWQSbW3uLX3+LZQSPhQBzoQBXtPxHwPg70Pgr3PQj6PQX9PQL9PgH+PQH/PQD///8u2j7wAAAAAXRSTlMAQObYZgAAAAFiS0dESPAC1OoAAACnSURBVEjH7cvFDUJRAATAt7i7u37c3Z3tvyMagIQ9kjD3MebvV+Unu68ZY4xBoLnVApAdiwG++loLQHooBnjrKy0AyYEY4KoutQAkemKAs7TQAhDriAH20lwLQLgtBqAwFQNCLTFE+nznY6icqYToiBSCrXahEuIzUgiO2pVKSG1IIbgbNyohsyeF4LHuVELuQArBbz2ohOKRFEKw+6QSyidSCn+/6AVZJ/lj6Iu4TgAAAABJRU5ErkJggg=='))) from dual

limitation is 32000 characters

 

BR


Hello Filip,

Thanks for sharing its fruitful for us.

I got picture from database using SQL Query Statement : SELECT data FROM BINARY_OBJECT_DATA_BLOCK_TAB where Blob_id = 12 (hard code) but when want to get dynamically means behalf of emp_no picture should be change but now it couldn’t get please help how to do this?

 

I put following but not get picture behalf of emp_no:

SQL Query Statement : SELECT data FROM BINARY_OBJECT_DATA_BLOCK_TAB where blob_id=:1 AND seq=:2

Bind Variables(max5) : /tns:PICTRE_ID

 

 

Regards,

Waqar Habib


Hi @Waqar Habib,
You use two variables in SQL but mentioned only one in “Bind Variables”.

I expect, you need to use Bind Variables as //tns:PICTURE_ID;//tns:PICTURE_SEQ  or //tns:PICTURE_ID;1 or I hope you can remove AND seq=:2 from SQL query.

 

In the text field SQL statement returning an image, specify a valid SQL query which will return the desired image from the database table.(SELECT data FROM binary_data_block WHERE blob_id=:1 AND seq=:2) The values given for the WHERE clause can be passed on as Binding variables. For instance in the above example, the value for blob_id is mapped to the first bind variable (tns:PICTURE_ID) which is denoted by "=:1" and the value for seq will be mapped to the second bind variable(1) which is denoted by "=:2". Up to five bind variables can be specified in the field Bind variable values each separated by semicolons. The value given for a Bind variable can be a Xpath such as tns:PICTURE_ID returning a valid id or even a hardcoded value 

 

Make sure if you use correct XPath, eg:

/tns:DEMO_ORDER_REP_REQUEST/tns:PROCESSING_INFO/tns:PROCESSING_ATTRIBUTES/tns:ORDERED_BY

tns:PROCESSING_INFO/tns:PROCESSING_ATTRIBUTES/tns:PRINTED_BY

tns:DEMO_ORDER_REP/tns:ORDERS/tns:ORDER/tns:EMP_NO

 

Or it should be like this:

SQL:

SELECT data FROM BINARY_OBJECT_DATA_BLOCK where blob_id = Person_Info_API.Get_Picture_Id(Company_Person_API.Get_Person_Id(:1, :2));

Bind Variables (note semicolon divider): 

tns:DEMO_ORDER_REP/tns:ORDERS/tns:ORDER/tns:COMPANY_ID;tns:DEMO_ORDER_REP/tns:ORDERS/tns:ORDER/tns:EMP_NO

BR


Hi Filip,

Thanks got it.

 

Regards,

Waqar Habib

 


Hi Filip,

Please guide

How to make List of Value(LOV) in IFS developer studio?

when we are going to run Order report now parameter values put Manually (not from LOV) now we want to select from list of values (LOV), please suggest how to make lov???


Hi @Waqar Habib ,
documentation (poor...) is here https://docs.ifs.com/techdocs/Foundation1/050_development/025_operational_reporting/045_report_modeling/200_model_syntax//100_keywords/100_keywords_itd/100_parameter.htm

 

See *.report file of some standard report what have it enabled.

 

BR


Hi Filip,

I am making order report of Time management to get data of present employees and as well as absent employees, I got data of present employees from table “C_TNA_DEVICE_CLOCKING_TAB” but could not fetch data of absentees, please help how to get data “present employee and absentees employees” in one report.

 

Regards,

Waqar

 


Hi,
since table start at “C_” prefix I expect that it is part of some of your customization. Then I cannot help you, because I do not know your system and db.
Also this is not any technical problem what could be solved in Community.

If you want some help of this type, you should ask some IFS partner or your ERP supplier.

If you want, you can try to contact https://infoconsulting.com/ .

BR


Reply