reference selected features table and invoke a custom report
I am writing a report using a report extension where the user selects features of interest on the map and the report logic crunches some numbers and modifies the output table for display in a GTX report. We are using the Silverlight Viewer v1.5 and GTX Essentials v3.9.
Currently my report is working fine when run as a "standard" report that prompts the user to select geometries: the data are captured and sent to the report as a DataTable in the DataSet. (My report extension modifies the DataTable by performing calculations and adding the results to additional DataColumns in the DataTable).
What I would like to do instead of using a standard report is to use a Workflow that allows the user to use already-selected features as the feature geometries to generate the report. This will allow users to select non-contiguous features using standard Silverlight Viewer selection tools. However the workflow will also allow for the user to select the features in the standard DisplayCaptureGeometry way using the selection tools (point, polyline, polygon, etc.). The workflow needs to be able to capture the geometries and associated field values in a DataTable regardless of whether they come from the ‘already-selected’ features or from the ‘DisplayCaptureGeometry’ features and pass that DataTable on to the report extension as it does now.
Borrowing from other workflows, I can see how to:
- Allow the user to either use already-selected features in the map, or not
- If using already-selected features, use a DynamicExternal operation to determine whether or not the user has features selected
At this point in the workflow, I should have a DataTable that has the geometries and (more importantly) the field values for the selected features, whether that DataTable came from already-selected features or from the DisplayCaptureGeometry sequence (which are stored in a variable of type Geometry named ‘captureGeom’). The next step is to build a sequence that resolves which of the two tables to use (i.e. one for ‘useSelected=True’ or the contents of captureGeom for ‘useSelected=False’). What I’m unsure of is:
1) How do I refer to the DataTable that has been captured when ‘useSelected=True’?
2) What should I include in my sequence to invoke my report as I do w/ a standard report, passing it the DataSet containing my DataTable as modified from my report extension (i.e. in Site.xml I have a <Layer><Reports><LayerTemplateReport><Extension> that has my custom code in an Assembly attribute that references a DLL w/ my Transform() method).
-
Thanks for posting this..
I'm also looking to generate a report on an already "starred" set of features. Our users also select non-contiguous features and executing a report/workflow would be very very useful.
Anyone have a simple example of executing a report on an already "starred" set of features?
and a simple workflow executing on a set of already "starred" features?
0
Please sign in to leave a comment.
Comments
1 comment