File image on the custom reports


i have made a report which takes the item of a fly tipping inspection.
in my inspection our teams takes two images a before and after so the photo are different

i have added the file image item onto the report however i can only get the first attachment on the report. ive tried making another file image item on the report however its just taking the first image on the inspection?

i need to be able to get both images on the one report linked to the inspection.

any ideas if this is possible ?


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.

Hi Jonathan

thanks jonathan.

not to sure on the AQS step where it returns the files where the parent inspection title matches , are you able to send a screenshot of the AQS builder?

Sure! The AQS builder for the Files data source is below:

Sorry, probably should have explained it a bit more in my previous post. I’ve created a parameter which uses the Inspection Data Source and grabs the Title of the Inspection this report is based on.

I’m then comparing it with the File’s Inspection Parent’s Title. This should return just the Files that are attached to this Inspection. Below is what your Pathfinder should look like when you’re going from Files to the Inspection Interface via Attachments.

Hi Jonathan

thank you this works perfectly.

amazing thank you.


1 Like