how to get Workflow variable values into Report controls
Is it me or are the Report Designer docs and examples a bit sparse?
I have a Workflow that produces values that are in VB variables in the workflow. The report is working fine, now I want to display its results on a Report.
I have a Report with Label controls. I want to display my workflow's variable values in those controls.
How do I plug a Report into a Workflow? Feel free to point me at docs if I should have RTFM.
Thanks!
-
Upon reflection, the approach I am taking is this:
- populate my various variables with their values using the Assign activity
- create a Dictionary variable with an Assign activity
- add each of my variable values to the dictionary, each with an arbitrary human-meaningful key acting like a field name using the AddToDictionary activity
- use the DictionaryToDataTable activity to transform that dictionary into a DataTable with one row, with field names being the keys, and field values being the dictionary values
- add my various such DataTables to a DataSet, and provide that to the Report.
0 -
I'm having the same problem. Can anyone from Latitude chime in on this?
0 -
Hello Mark and GCoupland,
In Report Designer, add a label and look at the properties displayed in the properties window. There is a property called DataField under the Data subsection. Set this to the appropriate key from your dictionary and it should propegate through.
When I am doing this from workflow, my dictionary is of the form Dictionary<string, object>. I am able to add byte arrays (for images) and strings to the dictionary and their values come through in the report.
Let me know if this works for you!
-Michael
0 -
Hi Mark,
The approach you are taking is the correct one. We do have an example workflow: (https://support.geocortex.com/essentialsGSCCodeGallery?sub-nav=codegall&main-nav=essentials&criteria=BESTANSWERS&id=kA4600000004EXN) Generate a multi-layer report that shows a similar implementation of this approach - bundling data into data tables.
regards,
Edmond0
Please sign in to leave a comment.
Comments
4 comments