Hide table header in csv output
Help,
I am trying to create a csv file without the field header information. First, I hid the table header row, then each column header separately, then removed the table header alltogether, but when I print to a CSV file the field headers still show up. This file is going to be use as input to another application and they do not want the header information.
What I get now:
OrderNo,OrderDate,OrderAmt
1,3/1/08, 25.00
2,3/1/08,25.00
3,3/1/08,25.00
4,3/1/08,25.00
What I want:
1,3/1/08, 25.00
2,3/1/08,25.00
3,3/1/08,25.00
4,3/1/08,25.00
Thanks for any help,
Fred
March 20th, 2008 5:58pm
Hi,
Remove the page header totally .
In the report body directly put the table and put the three feild in three cells without any table header (only keep the detail section and remove the table header and footer too.
So now you will get only the datas i mean the csv file.
Hope this will work fine for you.
Anyway please let me know if you get the solution.
Thanks
Mahasweta
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2008 6:08pm
Thanks for your reply.
I tried that and I still get the header info. I have removed everything except the detail row of the table.
Fred
March 20th, 2008 6:17pm
I had not tested, but maybe you can try list.
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2008 6:45pm
Hi ,
Put the table with location 0 ,0 .
And put only the detail one row,nothing else.
Its giving me properly as i tried with your data also.
Try and let me know if you still facing the issue.
Thanks
Mahasweta
March 20th, 2008 6:52pm
F,
You need to update your DeviceInfo in your report service configuration file for your CSV render and add the following
<NoHeader>false</NoHeader>
Hammer
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2008 8:39pm
H,
Wouldn't that change it for all reports? We may want header info on some reports in csv format.
Fred
March 20th, 2008 10:52pm
Create a rectangle in header. Place all the controls of the header inside Rectnagle. Set DataElementOutput to NoOutput. This should remove the header during CSV export.
Thanks,
S Suresh
Free Windows Admin Tool Kit Click here and download it now
March 21st, 2008 12:52am
Hi ,
Did you get it resolved?
Anyway if you got the solution plese do share the same in this thread too.
Thanks
Mahasweta
March 23rd, 2008 9:12pm
S
How do you create a rectangle in the table header?
I tried to merge all the cells and set their DataElementOutput to NoOutput. That does not work. I still get the header info.
Thanks,
Fred
Free Windows Admin Tool Kit Click here and download it now
March 24th, 2008 4:13pm
Hi Fred,
CSV file uses the textbox name in detail section as the column name, not the table header when you view the table. So set the DataelementOutput to NoOutput doesnt work. The only workaround I find now is to create a new table behind the table already exists. This new table should be exactly as the old one but without the table header. Set this table to be invisible. Set DataElementOutput to NoOutput in the detail cell of the old table. Then you will get the notable header report when export to CSV.
Hopefully this helps. Thanks.
March 25th, 2008 1:36pm
Well, I added the new table and setthe Output to No on the old table under the Data Output tab. The new table only has the Table Detail Row in it. I set the Visibility tab to Hidden if I understand you correctly. This produces no output in the csv file except the letters "vb".
Fred
Free Windows Admin Tool Kit Click here and download it now
March 25th, 2008 10:24pm
Fred
the only thing I can think of is that your can pass the device info in the url -
http://servername/reportserver?/yourRReports/ReportName&Parameter=value&rs:Command=Render&rc:NoHeader=True
Hammer
March 26th, 2008 8:35pm
Hammer,
That does sound like it will solve part of the problem. How do you get that to work in Report Manager without rewriting the code? I went into Properties and there is no setting for NoHeader.
Another solution is to export to Excel. There is no header info in the spreadsheet file.
Thanks,
Fred
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2008 10:47pm
Fred,
Unfortunely, the ways I suggested config file and URL are the only ways I know how to give you the results that you seek and as confirm by Reporting Service Tech article.
http://technet.microsoft.com/en-us/library/ms156281.aspx
In order to get the results that you want you will need to do one or the other.
Hammer
April 1st, 2008 7:01pm
If your report is designed to export to CSV: I needed one set of headers for multiple datasets in the same CSV export. I have changed the NoHeader setting in my config file to get around the problem with headers for the second and 3rd datasets. So I can still have headers at the top of the CSV file, I added a dataset to my report with the query like this:
SELECT 'header1' as [header1],'header2' as [header2]
This needs to match your desired headers of course. You can then add another data area at the top of the report with this dataset as the source and add all the fields to it. This of course appears even with the "NoHeader" option set since it is a single detail row. Now I just need to work out how to autogenerate the Select statement!
Free Windows Admin Tool Kit Click here and download it now
December 8th, 2009 3:17pm
Hi,
As someone else mentioned you can use the <NoHeader>false</NoHeader> in your rsreportserver.config. If you create a new extension (e.g. CSV-NoHeader) then it gives you the option to still export to CSV with headers on.
Hope this helps
<Extension Name="CSV" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering"/>
<Extension Name="CSV-NoHeader" Type="Microsoft.ReportingServices.Rendering.DataRenderer.CsvReport,Microsoft.ReportingServices.DataRendering">
<Configuration>
<DeviceInfo>
<NoHeader>True</NoHeader>
</DeviceInfo>
</Configuration>
<OverrideNames>
<Name Language="en-US">CSV-NoHeader</Name>
</OverrideNames>
</Extension>
April 4th, 2011 7:58am