Export to CSV includes text controls?

20 posts, 0 answers
  1. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 20 Nov 2007 Link to this post

    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
  2. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 21 Nov 2007 Link to this post

    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
  3. DevCraft banner
  4. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 21 Nov 2007 Link to this post


    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?

  5. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 21 Nov 2007 Link to this post

    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
  6. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 21 Nov 2007 Link to this post

    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.
  7. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 21 Nov 2007 Link to this post

    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
  8. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 21 Nov 2007 Link to this post

    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
  9. Vassil Petev
    Admin
    Vassil Petev avatar
    1765 posts

    Posted 22 Nov 2007 Link to this post

    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
  10. Will
    Will avatar
    45 posts
    Member since:
    Aug 2007

    Posted 22 Nov 2007 Link to this post

    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.
  11. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 23 Nov 2007 Link to this post

    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
  12. Kurt
    Kurt avatar
    17 posts
    Member since:
    Aug 2006

    Posted 22 Jan 2008 Link to this post

    Was anything done regarding CSV formating as I am having the same issue is Will was.
  13. Svetoslav
    Admin
    Svetoslav avatar
    649 posts

    Posted 23 Jan 2008 Link to this post

    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
  14. Ryan Skarin
    Ryan Skarin avatar
    3 posts
    Member since:
    Aug 2007

    Posted 23 Jan 2008 Link to this post

    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?
  15. Milen
    Admin
    Milen avatar
    163 posts

    Posted 24 Jan 2008 Link to this post

    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
  16. Prasanth Rajendiran
    Prasanth Rajendiran avatar
    7 posts
    Member since:
    Jul 2009

    Posted 29 Jul 2009 Link to this post

    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
  17. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 29 Jul 2009 Link to this post

    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.
  18. Prasanth Rajendiran
    Prasanth Rajendiran avatar
    7 posts
    Member since:
    Jul 2009

    Posted 30 Jul 2009 Link to this post

    Thanks Steve. It worked.
  19. rh
    rh avatar
    193 posts
    Member since:
    Jan 2007

    Posted 23 Dec 2009 Link to this post

    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.
  20. rh
    rh avatar
    193 posts
    Member since:
    Jan 2007

    Posted 23 Dec 2009 Link to this post

    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.



  21. Jeremy
    Jeremy avatar
    2 posts
    Member since:
    Apr 2009

    Posted 01 May 2010 Link to this post

    How does this work in WinForms?

    Setting a report viewer to export CSV with the NoStaticText setting ?
Back to Top
DevCraft banner