Monday, September 11, 2017

Print/Insert Image (.jpeg) object in SSRS Report (AX 2012 R3) attach via Document handling

Hi Friends,
I am presenting a process to print/Insert the Ax document handling attached image/file in a SSRS report in ax 2012 r3. Below example taken from purchase order attached file in document handling.

1. When we open purchase order list page than we can open document handling form from attachment menu item where we can add any type of file to this form, here we are attaching a image file.
2. After attachment of file now we want to print this image to our SSRS report, so basic method we are using to complete this task is to use image URL as image source in ssrs report. To get the image url we will use this query from DocuRef table and join it to the PurchTable
- This query is used in ProcessReport method of RDP class of SSRS report.

select docuRef where docuRef.RefCompanyId == PurchTable::find(vendInvoiceJour.PurchId).dataAreaId &&
docuRef.RefRecId == PurchTable::find("TestPO0001").RecId && 
docuRef.RefTableId == PurchTable::find("TestPO0001").TableId;

this table method will provide us the file url
DocuRef.CompleteFikleName() - after getting file name we will save it to our temp table of ssrs report.

3. Now open SSRS report design in visual studio and add an image in report body or footer as per our requirement and set the Image source property to External and add the dataset field (File path) here in expression (fx) and deploy the report, now it will display in your report.
after set this property just build and deploy report and we will get the attached image to the ssrs report.

Regards
B K Sharma

No comments:

Post a Comment

Customer transaction automatic settlement for specific customer groups only

Hi Friends, Recently I come to the requirement of my company where I have to automatic settle the customer transaction for the speci...