Skip to Content
avatar image
Former Member

csv export from vbnet 2005

I am using vb net 2005 and have several reports that I access from the frontend. The all run real nice. My problem is when I try to export a report in csv format it is not exporting right it will not export sub reports. How do I get the front end to export subreports data within reports?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 12, 2008 at 06:18 PM

    Hi Sandra,

    This is a limitation of Crystal report .

    We can try with exporting a report to Excel before saving the spreadsheet in CSV format .

    Hope this helps!!

    Regards,

    Shweta

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 12, 2008 at 09:41 PM

    Well, just to try...can we try this

    crReport.ExportToDisk(ExportFormatType.CharacterSeperatedValues,

    "c:
    temp
    myRpt.csv");

    AG.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 12, 2008 at 11:52 PM

    Hi Sandra,

    As subreports can not be exported in csv format due to limitations

    Try with this line of code its a workaround.I have tested at my end on VS2005 .

    //First of all Export the report in Excel and then save it to csv format

    {

    ReportDocument Rdoc = new ReportDocument();

    Rdoc.Load(Server.MapPath(u201CCrystalreport.rptu201D);

    Rdoc.ExportToDisk(ExportFormatType.Excel,u201DC:\Windows\Temp\ExportedReport.csvu201D);

    }

    Hope this helps !!

    Regards,

    Shweta

    Edited by: Shweta Sharma on Sep 13, 2008 1:52 AM

    Edited by: Shweta Sharma on Sep 13, 2008 2:03 AM

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 16, 2008 at 03:03 PM

    I tried the export to excel then renaming it as a csv file. The problem with this is it holds the excel formating and is unreadable in csv file. I was lead to believe that csv export was supported in the newer edition of crytal along with vb net.

    Add comment
    10|10000 characters needed characters exceeded