Skip to main content

Report to HTML format or Plain Text

Comments

1 comment

  • Permanently deleted user

    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:

    1. Obtain a FeatureSet somehow, by running a query task or otherwise getting the data we're interested in.
    2. Use FeatureSetToDataTable and AddToDataSet activities to convert your FeatureSet into a DataSet.
    3. Use the TemplateReport activity to generate the raw output.  Geocortex.Reporting.ReportFormat.Html and Geocortex.Reporting.ReportFormat.Text are valid here.
    4. Create a System.Text.Encoding variable (e.g. enc ) and assign it a default value of "new System.Text.UTF8Encoding"
    5. 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.