I am trying to export a KML formatted file from SSRS.
The path I went down was to use the ‘CSV Device Information settings’
&rs:Command=Render
&rs:Format=CSV
&rc:ExcelMode=False
&rc:FileExtension=KML
&rc:NoHeader=True
&rc:Qualifier=~
The resultant output looks like ..
~<?xml version="1.0" encoding="UTF-8"?>~
~<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">~
<Document>
<name>2016_12_19 09_17_18.kml</name>
~ <StyleMap id="msn_blue-pushpin">~
<Pair>
<key>normal</key>
<styleUrl>#sn_blue-pushpin</styleUrl>
</Pair>
<Pair>
<key>highlight</key>
<styleUrl>#sh_blue-pushpin</styleUrl>
</Pair>
The issue is that SSRS sees the double quote and decides to put the ‘Qualifier’ at the start and the end of the line (including the first line)
When the KML file is fed into Google Earth it complains that there is a parse error on line 1 ‘XML or text declaration not at start of entity’
Replacing the tilde with a space does not help (although the only line that Google earth complains about is the first).
I am looking for a technique to bypass this behaviour.
- Can I specify ‘<?xml version="1.0" encoding="UTF-8"?>’ without using double quotes? How?
- Can I specify a ‘Qualifier’ that is a zero length string? How?
- Can I get SSRS to treat lines with double quotes as not requiring delimiters? How?