SQL Server Developer Center > SQL Server Forums > SQL Server Reporting Services > Unable to Export to CSV for grouped data

Answered Unable to Export to CSV for grouped data

  • Wednesday, February 25, 2009 7:26 AM
     
     
     Hi, 
         I have a report created in SSRS 2005.The data us groped on a column  "Account No".
         The grouping , group totals ,grand totals are all displayed correctly.
         But when i export to CSV then wont export it properly and only some special characters are shown " ÿþ "
         Another report which has no grouping is exported correctly.
         since its the default report viewer of the report server we have no options to manuplate
         Please help with any clue


    Thanks & Regards
     Nitin

     

Answers

All Replies

  • Wednesday, February 25, 2009 6:24 PM
    Answerer
     
     
    Hi,

    Can you try the steps that are suggested by the article below?

    http://www.developerbarn.com/sql-server-reporting-services-help/445-csv-file-export-tip.html

    See if that helps solve your csv export issue.

    Thanks,
    Ke
    Ke Xu - MSFT Reporting Services
    • Marked As Answer by Ke XuEditor Friday, February 27, 2009 7:13 PM
    • Unmarked As Answer by Ke XuEditor Friday, February 27, 2009 7:13 PM
    •  
  • Thursday, February 26, 2009 12:35 PM
     
     
    Hi,
        Thank you for the reply.
        Tired out by changing the web.config. But the problem still persists.
        Also as mentioned in the link given by, tried forcing the report to diplay the report in CSV but it gives error to enter parameters.
       Never the less changing the settings in web.config for CSV export didnt worked (for grouped data ,for normal data it does works).
      


    Thanks & Regards
     Nitin
  • Thursday, February 26, 2009 9:11 PM
    Answerer
     
     Answered
    Hi NitP,

    Can you try following up on these past posts regarding issues similar to the one you're encountering?

    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/20a5d0c8-4657-4c8d-a59b-57af86d1635b/
    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/3dc5e784-8b1b-48d9-9c3b-cc9228b119a3/

    Thanks,
    Ke


    Ke Xu - MSFT Reporting Services
    • Marked As Answer by Ke XuEditor Friday, February 27, 2009 7:13 PM
    •  
  • Friday, February 27, 2009 5:23 AM
     
     

    Hi Ke Xu,

                   Thank you for the solution.

                   I changed the Dataout put to "Yes " from "Auto" for the table, it is now exporting to CSV.

                  But another issue with this export is that i am grouping the data on a/c number also displaying Totals of some column for each group ,and at the end Grand Total (which is sum of total of individaul group total) sample structure is as below

                 Group1

                                  group1 total

               group2  

                                 group2 total

            Grand total   (group1 total + group2 total)

     

            the problem is now Grand Total is not exported in the CSV file.

           Any clue!

    Thanks & Regards

     NitP

     

     

  • Friday, February 27, 2009 7:15 AM
     
     

    Hi,

         Apart from that Grand Toatal export issue one major problem is i have Summary,Detail kind of rendering in the report

        if user selects Summary option then only some columns are displayed which alos have totals, if user selects Detail option then all filelds are displayed. The i desinged the repor to use two tables 1st table all fileds for Detail version, 2nd table for summary version of the report.I toogle the visibility of the tables as per Summary(true/false).The report is diapleyd fine no probelm in that.But the main problem starts when i export that report to CVS.Its displaying all filelds irrespective of what fileds the reportvie shows.

    I am using same dataset for both verions of report only created new table to display the summary data.

    I also tried creating new dataset for summary verions.i that case what happens is everytime exprot then detail + summary verions are combinedly exported even if the visbility stuff works properly.

    Please help with any clue!

    Thanks & Regards

     NitP

     

  • Friday, February 27, 2009 10:35 AM
     
     

    Hi,

          The problem of grand total still persists!!!

          I modified ther report by using only one table and hidigng filelds for summary report and making visible if any fields .

         so now my report contains only one table with all fields for Detail and summary

        I toggle the visibility depnding upon Summary or Detail.The report display if fine .

        But when exported to CSV it exports all fileds same as in Detail verions of the report for both kind of reports

       Before this i tried with two tables one for Detail other for Summary in that case too all fileds are displayed only differnece was that for summary report Details fileds where shown empty,and for Details report Details + summary fields where displayed even if the tables where made visible true/false.

       Please help !!!

    Thanks & Regards

     NitP 

  • Friday, February 27, 2009 5:59 PM
    Answerer
     
     

    Hi NitP,

    The CSV renderer (along with the XML renderer) is different than most other SSRS renderers in the sense that it is a data, not layout, renderer. Thus, even if in the report viewer, you've set the visibility of items in the report, the data still exists (you just can't see it), and the csv renderer will output it. The way to control whether certain data is output in the csv renderer is through the DataElementOutput property for the individual report items (textbox, matrix, table, list, etc...). Therefore, in order for you to control what data gets output to csv, you would have to tweak with the DataElementOutput settings for the individual report items within your table.

    As for your grand total issue, csv renderer specifically does not render out automatic subtotal rows.

    Thanks,

    Ke


    Ke Xu - MSFT Reporting Services