reports not exporting to excel correctly

This public forum is for user-to-user discussions of ASP.NET Report Maker. Note that this is not support forum.

reports not exporting to excel correctly

Postby gra_bage » Wed Apr 16, 2014 3:24 am

I have a few reports developed in asp.net report maker 7. They report the data correctly, but when I try the export to Word or Excel function, Word/Excel opens with the page source code and not the data.

I also installed OpenOffice, and selected the Calc (OO spreadsheet program) program to open the file, and it opens correctly. To further troubleshoot, thinking it was an Excel 2013 issue, I tried an older version of Excel (2007). It still shows the source code, and not the actual resultant data. I tried reinstalling reportmaker, and I also downloaded the template file from the hkvstore site.

Any assistance would be greatly appreciated.

Thank you.
gra_bage
 
Posts: 2
Joined: Wed Apr 16, 2014 3:17 am

Re: reports not exporting to excel correctly

Postby Webmaster » Wed Apr 16, 2014 10:35 am

Uncheck [Tools] -> [Advanced Settings] -> [Compile] and regenerate ALL files again. Open App_Code/AspNetReportMaker7_<project>_dll/*smry.cs with a text editor (e.g. NotePad). Comment the following lines to show the exporting html:

// Export to EXCEL
public void ExportExcel(string html) {
//***ewr_Response.ContentType = "application/vnd.ms-excel" + ((ewr_NotEmpty(EWR_CHARSET)) ? ";charset=" + EWR_CHARSET : "");
//***ewr_AddHeader("Content-Disposition", "attachment;filename=" + gsExportFile + ".xls");
ewr_Response.Write(html);
}

Try the export again. Verify if the html content is correct.
Webmaster
 
Posts: 10730
Joined: Fri Aug 06, 2004 5:59 pm

Re: reports not exporting to excel correctly

Postby gra_bage » Wed Apr 16, 2014 8:26 pm

Thank you very much for your response and helpful instructions!

I unchecked the compile and regenerated all files in ReportMaker and AspMaker. My *smry.cs file was not in the AspNetReportMaker7_<project>_dll directory but in the AspNetMaker11_project1_dll.

After following your directions, clicking the "Export to Excel" icon produces correct html viewable in both IE and FireFox.

Further troubleshooting steps I have taken in the time from my original post and receiving this response:

Started by introducing one column field at a time to report, but any given single column still will not export correctly. I was thinking maybe I had some data in one of the columns mucking things up.

Thank you again for your assistance.
gra_bage
 
Posts: 2
Joined: Wed Apr 16, 2014 3:17 am


Return to General Discussion (ASP.NET Report Maker)