Report with selected features from multiple layers
Hello:
I'm looking for ideas on how to print a report that lists details for selected features on more than one layer. I've taken a look at the(http://support.geocortex.com/report-with-map-showing-all-selected-features) selected features map workflow from the code gallery and it does what I want - the trouble is, reports in GCE are configured by assigning a report to an individual layer.
In the application I'm working on a user clicks a point of interest, and the workflow creates 2 buffers from that point and then selects roads within 1000' and railroads within 3000'. The report/print then needs to have a map image showing the two buffers and selected features, but then how can the tables be added for both the roads and railroads when reports are configures per layer?
Thanks,
Nate
-
Nathan,
I'm doing a little research into this functionality as well, I was hoping to find a definitive answer, but no dice.
From what I gather, you'll probably need to create a template report in a workflow that collects a featureset/Datatable and invokes a method to add those to tables within a dataset. The dataset is referenced in the template report.
Basically:
Assign a variable to a new System.Data.Dataset
Invoke a method to add a datatable to add the datatable/featureset to the dataset.tables target object.
Use this dataset as the dataset for your template report.
I need to test whether I can add multiple featuresets/datatables to the dataset.table object and if I could reference the fields for multiple tables in the report. What this does NOT address, is being able to add the map to your report. I am still trying to figure out a way to get a map in a subreport from a template report that is invoked from a workflow :-\
0 -
Hi Erik,
You're on the right track. (https://support.geocortex.com/Data/Sites/1/multilayerreportwithmap.zip) Here is a workflow and the corresponding report that finds schools within 2 miles of a parcel, and displays data about both the parcel and the nearby schools, along with a map image. It works with the CharlotteOperational sample data located at "http://sampleserver1.latitudegeo.com/ArcGIS/rest/services/CharlotteOperational/MapServer".
We're working on getting this sample into the code gallery.
-Victoria
0 -
Victoria,
Unfortunately the piece of that workflow I was most interested in "Include Map Image" for creating the report, had errors in the XAML so I couldn't see the activities that were used to create the map for the report /customer/servlet/servlet.FileDownload?file=00P6000000e87yAEAQ
I'm looking at the raw XAML to try and make the activity out. Is the example you gave for the newest version of Workflow with GE3.11? I'm seeing some tools like DownloadImage and DictionaryToDataTable that look to be throwing the XAML error. Are these new/old/?
Also, that URL doesn't work either.
0 -
Hi Erik,
This example was created using the Workflow Designer that comes in Essentials 3.10, which is version 2.14.0.246. DownloadImage and DictionaryToDataTable were new for this version of Essentials. The workflow should also open without errors using version 2.15, which comes with Essentials 3.11. If you are using an older version of Workflow Designer, these activities will give the xaml errors you are seeing.
Is the url you mentioned in the Display Hyperlink at the end of the flowchart? This url must be changed to reflect your server name and instance of Essentials to work in your environment.
Here is a screenshot of the Include Map Image sequence:
/customer/servlet/servlet.FileDownload?file=00P6000000e88L2EAI
0 -
Thanks Victoria.
I was looking at the workflow in 2.13 from Essentials 3.9. I am upgrading to 3.11 on Thursday and will thus have workflow 2.15. I'll have a look then. Thanks for verifying!
-Erik
0 -
Victoria,
I got a chance to try and implement the example, however I'm having troubles with including the map image. I can assign the dictionary('"MapImage")=bitmap, but when it comes time to send "dictionary" to the DataTable<string,object>, I'm getting an error that the bitmap cannot serialize. This is the error:
/customer/servlet/servlet.FileDownload?file=00P6000000e88LCEAY
Has this been successfully implemented yet, without errors? It seems that it may have to do with differing system.drawing versions. Any ideas?
0 -
Hi Eric,
We've run into this error in testing as well. Make sure that your Data Set variable, as well as all of the Data Table variables, have their scope set to the Create Report sequence, instead of Flowchart.
If any of these variables are in scope when the next client-side activity is run (the display hyperlink activity at the end), you will get the serialization error you're seeing. We have made some additional modifications to avoid other errors, and we're hoping to have the finished version up on the Code Gallery later today.
-Victoria
0 -
Hi Eric,
It looks like it's your geoprocessing task is causing the data set to be serialized. Because it has to be in the same scope as the data set variable, try switching the order of the Include Map Image and RunTierReport sequences. This will cause the geoprocessing to happen before the bitmap is added to the data set, so this should fix the serialization error you're seeing. (Don't forget to also remove the Alert you put in after the Export Map activity; an Alert in the same scope as the data set will also cause the same error)
-Victoria
0 -
Thanks Victoria! That fixed the serialization error I was getting.
I am now exporting the bitmap, however it is not getting passed to the report. My image within the PDF document is blank. The values of my geoprocessing service get passed into the report, I can see in fiddler that the image is generated, I'm not getting any errors creating the report, but I can't seem to get the image into the report. I should just be able to add an image in my report and for the dataField property, make it "MapImage" correct? Is there anyway to ensure that the image is within the dataset that is used within the report?
0 -
Hi Eric,
The main report gets its data from the first data table that it finds in the data set. Because you switched the order so that the data table with the geoprocessing task gets added first, the main report will be looking in this data table for the map image.
To see the data from the table containing the map image, you will have to use a subreport. Add the subreport control to the main report where you would like the image to appear, and set the ReportName property to the name of the data table containing the map (in the last version of the workflow above, the table name was Map_Data). Set the Tag property to the (relative) url to the new subreport file. In the new subreport file, add the picture control, and set it's DataField property to MapImage (as long as this is still the name of the key in the dictionary that holds the bitmap in the workflow).
-Victoria
0 -
I knew I had to be missing something!
Thank you thank you thank you!
0 -
I know this is old, but I'm having the same problems.
I either get the iXMLSerializable error or, if i put the bitmap into its own DataSet, the report cannot find it (I've even tried the subreport angle)
I'm soooo close! Please help!
0
Please sign in to leave a comment.
Comments
12 comments