Show Selected Features in a Report
I have a workflow that peforms a query task and then highlights the selected features, but I cannot figure out how to display the selected features (geometries) in the report. In the report workflow component I don't have a geometry output where I am storing the selected features. What component (control) to I need to add to the workflow after the query task to generate a geometry output? Also, I want to just show the selected features in the report map. Thanks.
-
Hi William,
If I understand your question correctly, you'll need to use a UnionTask activity to generate a geometry based on you feature set coming from your query task. You can then supply that geometry variable you can supply it to your report.
If it is just a print template and not a report, I'd use a GetFeatureSetExtent activity to generate an evelope which you can then supply to the print map activity. If you use this method, I'd recommend supplying the envelope with a slight 'map space' buffer using the following method envelopeVariable.Expand(1.5) .
Warren
0 -
How is a print template different from a report? 0 -
Hi William,
I apologize, I got little off track and thought you were trying to achieve something different. I've realized you're looking to generate a map of the selected features within you're report and not separately. Basically adding the feature map to the report.
Anyways, I think you should be able to find what you are looking for in the example provided here: http://support.geocortex.com/la-county-parcel-report.
Warren
0 -
?Can you take a look at this workflow and tell me if the Union task is in the right spot? I have a point map service which I query and then I want to show the selected features in a report (map control). For some reason I can only get features in the map if I enter in a where clause. If I leave the Where clause blank then I don't see anything in the map control on the report.
/customer/servlet/servlet.FileDownload?file=00P6000000em1TjEAI
0 -
The Where clause should always be filled. If you want all the features, fill it e.g. with "1=1"
0 -
If I understand it correctly the union task will output a geometry which can be inserted into the map thus you don't need a where clause. I've seen other samples without where clauses. 0 -
Hi William,
As Nico suggested, you'll need to fill the where clause in with a dummy catch-all expression. Essentially, what the report is doing is performing a spatial selection on your point layer where the they intersect with the features you've collected in your selection (the provided geometry).
Warren
0 -
So I entered the same where clause that is in the query task to the report where clause, and set the geometry in the report to the output variable "geometry_W" from the Union task, but the map does not display on the report - it is blank. If I take out the geometry_W on the report then the map displays the image, but it shows the features selected and the other points. I want the workflow to filter and display only the selected features from the query (plus the background layers - countries). I wonder if this is maybe a limitation because I am querying a map service and not a feature service. Is there anyway to apply a filter just to show the selected features? My report is one of the sample templates that just contains a map control with datasource = _MainMap. I've seen some comments in the forums that you have to use a sub-report. Thanks for the help.
0 -
Well I never got the union task to work properly, but i figured out how to create a filter to show just the selected feature. You can use the SetLayerDefinition activity to basically create a filter or a "definition query". http://support.geocortex.com/SupportForums/Thread.aspx?pageid=0&mid=2&ItemID=20&thread=55054
0
Please sign in to leave a comment.
Comments
9 comments