This is a migrated thread and some comments may be shown as answers.

Export to CSV includes text controls?

19 Answers 560 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Will
Top achievements
Rank 1
Will asked on 20 Nov 2007, 10:47 PM
Hello -
I have a report and when I choose the export to CSV, the report is generated, but it includes the text box controls that I use as labels as well, not just the data values.

So, instead of what I would expect:
"Jones, Janet",555-555-9999,555-555-1222

I see this:
TextBox1,TextBox2,TextBox3,TextBox4,TextBox5
Full Name,Cell Phone,Home Phone,"Jones, Janet",555-555-9999,555-555-1222

Is this a bug? or is there a way to fix this?
thanks
 - will

19 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 21 Nov 2007, 08:44 AM
Hello Will,

From the Telerik Reporting point of view there are no things such as label. The TextBox item can display a hardcoded string or the result of an expression. In all cases this is just a data and we cannot make any decision whether to display it or not. The described behavior is by design.

Indeed you have a point that a improvement can be made in order to choose whether to display the "labels" or not.

I hope this information helps. Thank you.

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Will
Top achievements
Rank 1
answered on 21 Nov 2007, 09:12 AM

Hello -

I understand that the Telerick Report control does not provide a "label".  I use the TextBox control to emulate a label. 

Is there any way to solve my problem??  Does Telerik support a different way of having a report "label" and not having it be part of the export to CSV format?

0
Svetoslav
Telerik team
answered on 21 Nov 2007, 10:42 AM
Hi Will,

The only thing you can do for now is to create a report suitable for the CSV export - that is without the static labels.

Regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Will
Top achievements
Rank 1
answered on 21 Nov 2007, 04:42 PM
Hi
That is too bad.  You see, we have created 30 or 40 reports that all of our users will want to export to the various formats, including CSV.  So what you are saying is that I will have to create a duplicate report (another 30 or 40 now....who knows how many later) for every single report!?  That will be a maintenance nightmare.
0
Svetoslav
Telerik team
answered on 21 Nov 2007, 05:23 PM
I agree with you, Will, and I know that this is not the best solution, but it is the only possible to the moment. We will think of some way to command the CSV report export to omit the header row and static texts, if needed. We have not come around to this feature yet, so I am afraid  there is no smarter workaround at this time. I am deeply sorry for this.
 

Yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Will
Top achievements
Rank 1
answered on 21 Nov 2007, 05:39 PM
I am sorry too.  I was hoping that the Telerik reporting would replace our need for Sql Reporting Services....but with things like this, I just don't see that happening.

thanks
0
Vassil Petev
Telerik team
answered on 22 Nov 2007, 01:18 PM
We will do our best to provide this feature for Q3, Will, however I cannot promise that we will have it for certain. As you know, it all comes down to deadlines and available time, and if we have a time window, we will surely implement it.

BTW, why would like to move away from SQL Reporting services? It is a very powerful and quite advanced product, and is definitely a very strong player on the BI market. Could you share what your experience is? We will appreciate your feedback and will do our best to make things better in our tool.


Kind regards,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Will
Top achievements
Rank 1
answered on 22 Nov 2007, 05:12 PM
That would be great if this could get into your Q3 release....as either some property of a control (AllowExport or some name) or even a Label control that wouldn't export to CSV.

The reason that we were looking at moving away from SSRS is that we run an enterprise application that is on the internet and our users are NOT part of our windows network/domain.   So, being able to simply allow users to run reports via the forms based security through our web site is a great advantage.  Yes, Telerik doesn't have all the BI tools that SSRS does....but it a light-weight alternative and seems (so far) to handle most of what we want.
0
Svetoslav
Telerik team
answered on 23 Nov 2007, 08:55 AM
Hi Will,

Your case seems to be very interesting and we are glad that you have shared it with us. Regarding the CSV - we will do our best to make this improvements for the Q3 2007 release.

Thank you for your understanding and cooperation.

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kurt
Top achievements
Rank 1
answered on 23 Jan 2008, 04:54 AM
Was anything done regarding CSV formating as I am having the same issue is Will was.
0
Svetoslav
Telerik team
answered on 23 Jan 2008, 08:48 AM
Hi Kurt,

As of version Q3 2007 you can configure the CSV rendering extension to omit the TextBoxes that display static text. Also you can specify whether to have the 1st row with the column headers.

For more information see Configuring Telerik Reporting.

Best wishes,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Ryan Skarin
Top achievements
Rank 1
answered on 23 Jan 2008, 04:49 PM
I am trying to do the same thing, and my controls seem to be ignoring my web.config's settings.  I have this in my config:

  <configSections> 
    <section name="Telerik.Reporting" type="Telerik.Reporting.Processing.Config.ReportingConfigurationSection, Telerik.Reporting.Processing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" 
     allowLocation="true" 
     allowDefinition="Everywhere"/>  
    <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net-net-1.0"/>  
  </configSections> 


<Telerik.Reporting> 
    <Extensions> 
      <Render> 
        <Extension name="CSV" 
                   type="Telerik.Reporting.CsvRendering.CsvRenderingExtension, Telerik.Reporting.Processing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" 
                   description="Renders a report for CSV Export" 
                   visible="true">  
          <Parameters> 
            <Parameter name="NoStaticText" value="true"/>  
          </Parameters> 
        </Extension> 
      </Render> 
    </Extensions> 
  </Telerik.Reporting> 


Am I missing something somewhere?
0
Milen | Product Manager @DX
Telerik team
answered on 24 Jan 2008, 11:52 AM
Hi Ryan Skarin,

As you can read earlier in the thread, this feature is available since version Q3 2007 of our Reporting product. Please confirm that you are using the latest Q3 2007 SP1 release of the product.

Other possible reason for this behavior could be if you are using
Q3 2007 SP1 version - all the usages of 2.0.0.0 version in the configuration file must be replaced with 2.0.1.0  . But in this case you should receive some error.

Also, please confirm that the <Telerik.Reporting> section is located directly in the <configuration> element.

If that does not help, please send use the whole project or sample project that reproduces this behavior.

By the way, there is no need to supply the type attribute in the Extension element, as you are not creating second CSV extension, you are just configuring the current one.

So instead

        <Extension name="CSV"
                   type="Telerik.Reporting.CsvRendering.CsvRenderingExtension, Telerik.Reporting.Processing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
                   description="Renders a report for CSV Export"
                   visible="true"> 
          <Parameters>
            <Parameter name="NoStaticText" value="true"/> 
          </Parameters>
        </Extension>


it is good enough

        <Extension name="CSV"
                   description="Renders a report for CSV Export"> 
          <Parameters>
            <Parameter name="NoStaticText" value="true"/> 
          </Parameters>
        </Extension>

.
In case you want the default CSV extension to be available, and an additional CSV extension with NoStaticText to be available, use

        <!-- This element is just to change the description of the default ext. -->
        <Extension name="CSV"
                   description="Default CSV Export"> 
        </Extension>

        <!-- The new unique name tells the Reporting to create new extension. -->
        <Extension name="CSV_NoStaticText"
                   type="Telerik.Reporting.CsvRendering.CsvRenderingExtension, Telerik.Reporting.Processing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=a9d7983dfcc261be"
                   description="Renders a report for CSV Export"> 
          <Parameters>
            <Parameter name="NoStaticText" value="true"/> 
          </Parameters>
        </Extension>


I hope this information helps.

Best wishes,
Milen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Prasanth Rajendiran
Top achievements
Rank 1
answered on 29 Jul 2009, 12:08 PM
hi
I am using Q1 2009 release..Am encountering the same problem..I tried the above code..i changed the version to 3.0.9.430..still the header column is displayed in the CSV file...how to fix it..?
thanks in advance
Prasanth
0
Steve
Telerik team
answered on 29 Jul 2009, 02:18 PM
Hi Prasanth,

The code from my colleagues' last reply is about the static text only. If you want to hide the headers you should set NoHeader parameter as well. KB article that fully describes this is available here:
Configuring the CSV Rendering Extension.

Best wishes,
Steve
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Prasanth Rajendiran
Top achievements
Rank 1
answered on 30 Jul 2009, 05:36 AM
Thanks Steve. It worked.
0
rh
Top achievements
Rank 1
answered on 24 Dec 2009, 01:05 AM
FYI, the links in this thread on how to configure the CSV export to not include the labels in each row do not work and this subject does not appear to be in the help file. Or at least I haven't been able to find it in the help file.
0
rh
Top achievements
Rank 1
answered on 24 Dec 2009, 02:39 AM
Some observations for others who may find this thread:

Steps to add to configuration file:

Add this line inside the <configSections> node. Of course, change the version number.

<section name="Telerik.Reporting" type="Telerik.Reporting.Processing.Config.ReportingConfigurationSection, Telerik.Reporting, Version=3.2.9.1104, Culture=neutral, PublicKeyToken=a9d7983dfcc261be" allowLocation="true" allowDefinition="Everywhere"/>

Add this inside the <config> node:

<Telerik.Reporting>
  <Extensions>
    <Render>
      <Extension name="CSV"
                   description="Renders a report for CSV Export">
        <Parameters>
          <Parameter name="NoStaticText" value="true"/>
        </Parameters>
      </Extension>
    </Render>
  </Extensions>
  </Telerik.Reporting>

I've only used this with the Table control inside Telerik Reporting so the information below is in regards to that.

This configuration will use the Name property of the field itself in the table element. This means that it does not use the Value or Name properties of the headers in the table control. I found this out the hard way.

This makes it difficult to be consistent with the export to Excel and CSV. Exporting to Excel will use the values in the headers in the table whereas exporting CSV uses the Name of the fields. So, the header info for exporting from Excel is coming from a different place than the header information for exporting to CSV. This can be resolved by making the Value of the header the same as the Name of the field. Not an ideal workaround in all situations, but at least there is a workaround.



0
J
Top achievements
Rank 1
answered on 01 May 2010, 04:02 PM
How does this work in WinForms?

Setting a report viewer to export CSV with the NoStaticText setting ?
Tags
General Discussions
Asked by
Will
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Will
Top achievements
Rank 1
Vassil Petev
Telerik team
Kurt
Top achievements
Rank 1
Ryan Skarin
Top achievements
Rank 1
Milen | Product Manager @DX
Telerik team
Prasanth Rajendiran
Top achievements
Rank 1
Steve
Telerik team
rh
Top achievements
Rank 1
J
Top achievements
Rank 1
Share this question
or