Insert photo attachment to report using Report Designer, is it possible?
Hi,
Is is possible to use Report Designer to create report include feature attributes and the attachment (photos)
We've collected some assets data and taken photos for each asset. For each asset feature we want to create a one-page report showing the attributes and photos. Is it possible?
-
Jason, have you been able to do this?
I would like to do this as well.
Thanks,
Susan
0 -
Thanks for your help Jason, it's very appreciated! Hopefully the code you provided will get me started.
I have multiple photos for each record that will need to be displayed the report.
I am not sure what you mean when you write "you need to write your own bit to deserialize the JSON stream to objects. Note the Geocortex Report Designer is on .net 2.0 so won't support JavaScriptSerializer Class."
I am new to Report Designer/GeoCortex.
Another quick question, where do your photos reside? I have a ESRI SDE feature class (point). The photos stored as blobs in a related table. The feature class is published as a map service.
Thanks again for your help,
Susan
0 -
Something got removed from this sample along the way -- there was originally a 'stream' variable that was writing debug messages to a text file. This has been removed, but there is a reference remaining in the 'catch' that is attempting to write the error to this file.
Removing the line in the 'catch' will get rid of this particular error. Unfortunately it is probably masking another error that is happening, or you would not have ended up in the 'catch' in the first place.
You could also just add it back, as you might want to know what the error actually was if it doesn't bubble up to wherever the report is running. Debugging via 'print' statements like this is sometimes frowned upon, but it can often be a convenient and targeted way to find out what has gone wrong. Plus you just don't really have another choice when working with Report Designer scripts.
using (System.IO.StreamWriter stream = new System.IO.StreamWriter (@"C:\path\to\my\debug.txt") { try { // do some work } catch (exception ex) { stream.WriteLine(ex.GetType().Name + ": " + ex.Message); } }0 -
Thanks again, Jonathan. I was able to get this to work, but need it to recognize those features without an attachment and apply a "No image available" image to those records, or just leave the frame blank. Right now, it is applying the last image it came across to those w/o an attachment record.
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
4 Kommentare