I don’t have the same stuff in my environment, so I can’t actually test the code to see if it works. My best guess is that you should build an HTML table out of the results, then export that to CSV:
trs of ( concatenations of tds of (name of item 1 of it; (it as string) of number of elements of intersection of (relevant fixlet set of item 1 of it; item 0 of it) ) ) of (set of source fixlets of components of component groups of bes fixlets whose (baseline flag of it AND name of it = "WinBaseLine2012R2\NewDeployment"), members of bes computer group whose ( & name of it= "AutoBaseLine") )
I don’t tend to use webreports very often either, so I’m not sure what is expected to use the export to CSV option, but I do use session relevance a lot to build tables.
I personally prefer to use the DataTables javascript library for displaying tables in WebReports, or Dashboards, or similar. This isn’t easy to implement if you have never done it before, but it is very powerful. DataTables has it’s own method for providing export options:
- https://datatables.net/extensions/buttons/examples/initialisation/export.html
- https://datatables.net/forums/discussion/30218/how-to-show-export-buttons-at-the-bottom-of-the-table
Here are some example dashboards (that can also be web reports in most cases) that use DataTables:
- https://github.com/jgstew/bigfix-content/blob/master/dashboards/HiddenContentAudit.ojo
- https://github.com/jgstew/bigfix-content/blob/master/dashboards/BaselineStatusResults.ojo
I don’t currently have export buttons on these Dashboards, but this post has made me realize it is something worth considering.