Webreports export to CSV question - formatting troubles

So I have session relevance that works and returns the information I want but when I export it to a .csv file it contains <br /> in the file along with the information. Below is the format it appears now:

BFCB02	 11<br />BFCB01	10

I would like it to be formatted like below:

BFCB02	11
BFCB01	10

Here is the session relevance I am using:

<?relevance (name of item 1 of it, number of elements of intersection of (relevant fixlet set of item 1 of it; item 0 of it) as string ) 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")) ?>

Is there a Document Type descriptor I can use to get the format correct or HTML?

1 Like

For some reason I can’t tell the difference between the two formats.

1 Like

Sorry about that …

This is the current format:

and this is the session relevance:

<?relevance ("%0A" & name of item 1 of it, number of elements of intersection of (relevant fixlet set of item 1 of it; item 0 of it) as string ) 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") ) ?>

The forum software was stripping out the HTML. I edited the original post to correct this.

1 Like

OK thank you and hope what I am asking is clear enough to understand what I am looking to do.

1 Like

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:

Here are some example dashboards (that can also be web reports in most cases) that use DataTables:

I don’t currently have export buttons on these Dashboards, but this post has made me realize it is something worth considering.

TODO: add file export options to my DataTables

So when I try to put this code into an HTML table:

I receive the following error:

“It” used outside of “whose” clause.

But if I run the Session relevance without trying to put it in a HTML table it works great and I get my results. Any help would be great.

1 Like

You have a relevance error from your table code you added. You are missing an of and maybe more.

Can you please paste the code directly into the forum software as text and save it without modification? Don’t worry if it doesn’t look right, I can fix that.

I had a similar issue recently that was resolved by Lee Wei. Take a look at this thread.

Here is my releveance I am using and it gets what I want but when I export it to CVS in a schedule it also adds in the HTML tags. I am looking to format it so each result is on it’s own line and the csv file does not contain the tags.

(name of item 1 of it, number of elements of intersection of (relevant fixlet set of item 1 of it; item 0 of it) as string ) 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"))