Hi!
This is indeed possible, what you need is to create a Join datasource which joins your Inspection with the Files attached to it, pass that to a repeater that has the image control within it and set the File’s ID to be the control’s source.
First, creating the Files datasource:
In this report, I have a single item data source which is an Inspection and I’ve added an AQS data source which is returning Files where the parent Inspection’s title matches.
Then I’ve created a Join Data Source that Joins From the Inspection’s Attachments attribute to the Files’ Item Ids
What this effectively does is make a table of data that looks a bit like this below:
Inspection Title |
File ID |
File Title |
… |
INS-1 |
File01_ID |
First File |
… |
INS-1 |
File02_ID |
Second File |
… |
Now in my Document, I’ve added a Repeater control, set the Data Source to the Joined Inspections and Files and repeated on the Files Item Id (be careful not to pick the Inspection’s Item Id, in the list of headers to repeat, there will be two Item Ids, one for the Inspection and one for the Files. The attribute code of the files one will match the name of the Data Source)
Then within the repeater, I’ve added a File Image Control and set the source of the control to be Dynamic and use the Item Id attribute of the Repeater Parent Context for the File. This means for each of the rows in the data source, the File Image Control is being passed the ID of each of the linked files to the Inspection. (Remember, you’ll probably have to select the Second Item Id record to correspond to the file)
So now I’ve got my finished document with the File Image Control being repeated, once for each file that is attached to this Inspection. I’ve added the Inspection Title just for a bit of completion
After running this report against an Inspection with two attached images, I get the below result with the Alloy Logo as one image and Albot as another image.
Hope that helps! Let me know if you have any questions.