cancel
Showing results for 
Search instead for 
Did you mean: 

csv export from vbnet 2005

Former Member
0 Kudos

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?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

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

Answers (3)

Answers (3)

Former Member
0 Kudos

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.

Former Member
0 Kudos

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

Former Member
0 Kudos

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

crReport.ExportToDisk(ExportFormatType.CharacterSeperatedValues,

"c:
temp
myRpt.csv");

AG.