Forum Discussion
Access Report Wizard only displaying 2 Sharepoint List Record Attachments
Hi as the Title suggests, I have an SP/List with Attachments Column containing a number of Photos.
When I run the Access Report Wizard and select ALL fields from SP-Linked Table, the Report only shows 2 of the possible Attachments (I have upto 5).
Any ideas?
Thanks
- George_HepworthSilver Contributor
JonathanSdavey Please show the SQL from your query, the one which provides the records for the report.
- JonathanSdaveyCopper Contributor
George_Hepworth Hi thanks for replying. There is no custom Query, im using MS Access (MSA) builtin Report Wizard.
The MSA Report Wizard uses the "Attachments.FileURL" FIELD to 'fetch' the Attachments.
The MSA Field "Attachments.FileName" = the attachment name in SP
The MSA Field "Attachment" displays the attachment (in my case a photo.jpg)
The MSA Report looks like the screenshot below. However, the actual Attachments (photo.jpg) should be all different! Also below is a screenshot of the Actual Attachements using the Attachments.FileURL in browser and for completness a screenshot from SP showing the same 3 named attachments.
The "Attachment.FileURL" is correct in Sharepoint and Displays the correct attachment (photo.jpg) in a browser. Access also shows the correct unique/individual Attachment.FileURL in REPORT. BUT displays the same attachment (photo) for each Attachment Field.
In plain English, there should be 3 different photos in the Report but Access is showing 3 of the same, inspite of the fact it "knows" and displays the unique seperate FileURLs in the RECORD.
MS Access REPORT WIZARD for RECORD ID 74
Browse to URL ID RECORD 74 Attachment "2"
Browse to URL ID RECORD 74 Attachment "3"
And for Completeness the Same Attachments within SP
- George_HepworthSilver Contributor
Okay, let's start with the form's recordsource. There is one. ALL reports have to have a recordsource in order to display records. However, that recordsource can be created in more than one way. You used the Report Wizard. It generates a SQL statement when you select table(s) and fields for the report. It is stored in the report's Recordsource property. You can also create a saved query--with exactly the same table(s) and fields--and use the name of that query as the report's Recordsource property. Either way, there is SQL there to look at.
With regard to the way the images are displayed, I don't use or endorse using attachment fields in Access, although because this is a SharePoint List with attachment fields, the same problems would not necessarily apply.
Here, I think the problem is in the image control on the report into which the images are supposed to be inserted. That's separate from the other two controls on the report. Apparently the control source for that image control is referring only the the first value in the attachment field, whereas the other two controls are referring to the location of the image files.
Open the report in design view and look at the control source for the image control. WHat's there?