Report to HTML format or Plain Text
It is possible to export a report to HTML format or Plain Text?
0
-
Hi Gord,
We don't have the option to export a Print Template or Layer Report as HTML or text directly from Essentials, but you can do it in Workflow.
The "Template Report" activity accepts a URI (path) to an RPX file and a DataSet and creates a byte array with the results (since they're usually binary). So, the following sequence (in Workflow) will work to generate HTML or text:
- Obtain a FeatureSet somehow, by running a query task or otherwise getting the data we're interested in.
- Use FeatureSetToDataTable and AddToDataSet activities to convert your FeatureSet into a DataSet.
- Use the TemplateReport activity to generate the raw output. Geocortex.Reporting.ReportFormat.Html and Geocortex.Reporting.ReportFormat.Text are valid here.
- Create a System.Text.Encoding variable (e.g. enc ) and assign it a default value of "new System.Text.UTF8Encoding"
- Assign the results of enc.GetString(bytes) to a string in workflow.
Now you have a string that is either HTML or text content, which you can output to a temp file or otherwise deal with in workflow.
Regards,
-Malcolm
0
Please sign in to leave a comment.
Comments
1 comment