Add tables to DataSet
Is there a simple way to add output FeatureSets from a QueryTask to a DataSet for use in the Report Template?
I have used the FeatureSetToDataTable activity to get a System.Data.DataTable output and I created a variable of type System.Data.DataSet. I want to add the output of the FeatureSetToDataTable activity to the DataSet, but I have not gotten the syntax right yet for the assign activity, assuming that is the right approach.
It would seem that this should be doable outside of having to create a custom activity.
Marc
-
Hi Marc,
This is possible but the nature of the Tables collection of the DataSet makes it a bit awkward.
Let's assume you have a DataSet in a variable called "ds" and a DataTable in a variable called "dt".
- Add an Invoke Method activity to your workflow.
- Set the TargetObject to "ds.Tables".
- Set the MethodName to "Add".
- Click the "..." button next to the Parameters collection in the Properties pane.
- Click Create Argument.
- Set the Direction to "In".
- Set the Type to "DataTable".
- Set the value to "dt".
This will invoke the Add method on the DataSet's Tables collection and pass in your DataTable as a the method parameter.
--Ryan
0 -
Thanks, Ryan!
Marc
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
2 Kommentare