cancel
Showing results for 
Search instead for 
Did you mean: 

exporting dataset from crystal to excel

Former Member
0 Kudos

Hi, We are trying to resolev an issue which failed to do when exporting dataset from crystal to excel. This used to work. The report was build on .NET Framework 1.1/Visual Studio 2003. Any help would be appreciated. thank you

Here is the code that use to export dataset from crystal to excel. Also, You can uninstall and reinstall crystal report on test server(s3w06410.devfg.rbc.com).

RelationshipDetailsReport rptComp;

rptComp = (RelationshipDetailsReport) Session["CompReport"];

// string strExportFile = DataManager.Outgoing_FileDirectory + "/CompRelAcct.xls"; //Server.MapPath(".")

string fileName = getFileName("CompRelAcct.xls");

string strExportFile = excelFileFirectory + fileName;

rptComp.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;

rptComp.ExportOptions.ExportFormatType = ExportFormatType.Excel;

ExcelFormatOptions ObjExcelOption = new ExcelFormatOptions();

ObjExcelOption.ExcelUseConstantColumnWidth = false;

rptComp.ExportOptions.FormatOptions = ObjExcelOption;

DiskFileDestinationOptions objDiskOpt = new DiskFileDestinationOptions();

objDiskOpt.DiskFileName = strExportFile;

rptComp.ExportOptions.DestinationOptions = objDiskOpt;

rptComp.Export();

CopyFile(fileName);

string excelFile = "./ExcelArchive/" + fileName;

Response.Redirect(excelFile);

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

What version of CR?

What CR updates are you using?

Web or win app?

Ludek

Follow us on Twitter http://twitter.com/SAPCRNetSup

Former Member
0 Kudos

CR for Visual Studio 2003 version which embebed with Visual Studio 2003 SP1.

No updates as far I know

It's a web application.

Note: The exporting dataset from PDF to excel has no problem.

As I indicated, It was workinbg fine until It did not work after I think when we applied a Microsoft MS09-001 security patch.

former_member183750
Active Contributor
0 Kudos

Yup. A known issue. Well documented in the kbase:

https://www.sdn.sap.com/irj/scn/advancedsearch?cat=sdn_ossnotes&query=&adv=true

Anyhow, download the latest SP here;

https://smpdl.sap-ag.de/~sapidp/012002523100009301312009E/crnet11win_en.zip

that should resolve the issue.

Ludek

Former Member
0 Kudos

Hi Ludek Uher

Thanks. This is a great help. we will study this and apply the patch. I'll update you with the results.

Thanks again for this information.

Answers (0)