Reports with Photos and Attachments
Is there a reliable way to add photos to reports yet?
We've had mixed success with adding photos files. ... ie photos being repeated between multiple features.
What about attachments?
We've got point data which has either a URL pointing to the a photo or multiple attachments.
We're using 3.14 & 1.9.
-
How are your photos stored? I have a property report that pulls a photo of the property stored in SQL Server via a data link.
0 -
We've had photos as files with filenames in fields using the following code and had situations where the photo is repeated between features.
But we're moving away from files and more towards attachments with ArcGIS Mobile handling attachments.
string pictureUrl ="http://server/" + rpt.Fields["PHOTOLINK"].Value;
using( System.Net.WebResponse response = req.GetResponse() )
//PictureProperty is the name of the Picture control - your's might be a different name
Picture PictureProperty = rpt.Sections["Detail1"].Controls["PictureProperty"] as Picture;
0 -
My process is quite a bit different. I am using a subreport on the main report. The subreport is just a reference to a data link that's set up on the parcel layer in my site. That data link runs a query to pull the photo with the matching parcel ID from a different SQL Server db (I use a one to one relationship because I only want the most recent photo, but you could also set it up as one to many for multiple photos).
I would think this could be done with attachments as well.
0 -
If anyone can provide a bit more info about how to add attachment images (png/jpg/gif) to reports we would love to hear about it.
We will need to do this soon.
0 -
This is an interesting topic as this applies to documents too.
We have a lot of photos linkied by the file name and point id.
All our photos are stored in a file system and we extract the photos using a coldfusion page listing all the associated photos for a point as a hyperlink.
We've been looking at using attachments and datalinking methods also...
ken
0 -
Has anyone found a solution for showing attachments in a report?
Thanks, Barbara
0 -
I just struggled with this but think I have it working. It is based on the a combo of the suggestion by John in this thread, and Peter's scripting to add a picture to a report via a link. I made a Data Link to the attachments table in SQL Server. Then made a subreport on that table and added a picture control and text box in the subreport. I constructed the link using the attachment table info. Here's my sloppy version of the script:
public void Detail1_Format()
//get params from the attachments table
//build the link
//init the picture and textbox
0 -
Thanks so much for the code. I am getting an error though: "There was a workflow error running activity: Error running report 'Timeout exceeded'". Maybe I have too many attachments? I am trying to find a solution to extend the time limit of 60 seconds. Any suggestions?
Barbara
0 -
No problem, hope it works for you. I think you can set the Timeout time like this: req.Timeout=10000; (milliseconds) though I haven't tried it.
http://msdn.microsoft.com/en-us/library/system.net.webrequest.getresponse(v=vs.110).aspx
David
0 -
David,
I found out my timeout issue was because my subreport wasn't set up correctly. How did you configure your subreport using the datalink table?
Thanks, Barbara
0 -
Hi Barbara,
Here is the data link SQL, the link in manager is called InspectionAttachments:
SELECT ATTACHMENTID, REL_OBJECTID, CONTENT_TYPE, ATT_NAME, DATA_SIZE, DATA FROM Vector.sde.HYDRANTINSPECTIONS__ATTACH WHERE REL_OBJECTID = @ObjIDLink
The subreport field ReportName is InspectionAttachments, and the tag is the [filename].rpx of the subreport file.
That what you mean?
David
0 -
David,
Thank you so much! I got it to work after I fixed the SQL Statement.
Barbara
0 -
I know this thread is quite old, but I was wondering if anyone had any suggestions of how to resize the photos once they are in the report. We have a site that allows a user to take and submit a photo that is then stored in a SQL database as a varbinary. We then have another site that allows our inspectors to view the photo in a report. However, the photos are so large, only a quarter of the photo shows up on a page...Any ideas? 0 -
Hi Lisa, 0 -
Lisa, a non-technical question: What in heaven's name is that a photo of? 0 -
Hi All, 0 -
Hi Nataliya - I am having the same problem as you - the report is running but no pictures. Did you work out what the problem was? 0 -
Inga, 0 -
Hi Nataliya, 0 -
Inga, 0 -
It's likely not you, Nataliya. I just took a quick look at the release notes, and GE-6972 was actually resolved in 4.8. I've confirmed this in our issue tracker. 0 -
Jordan,
0 -
Nataliya, 0 -
Mandy, 0 -
Thank you Amanda and other contributers, I have tried again and finally got the attachments in my report ! A happy day for me. 0
Please sign in to leave a comment.
Comments
25 comments