Reporting Services in Local Mode

rdlc在设计时,如果要将DateTime类型的字段展示成x年y月z日,那么需要使用格式化字符串的函数,但是格式枚举会有问题,它总显示一个红色波浪线, 代表这个脚本有问题,可是实际上,在msdn中查询出来的任意格式枚举都不会有错误,显示效果是正常的,这个算是一个假警报。






Rendering .rdlc to Excel in Firefox on Mac

Richar posted on Tuesday, August 05, 2008 4:20 PM

I'm rendering a localreport to Excel. Works fine in IE and Firefox on a PC,
but Excel can't open it on the Mac. I found KB article 918529 at
http://support.microsoft.com/kb/918529 that somewhat describes the problem
for an SSRS 2005 server report, but I'm not using SSRS to render a server
report, it's a .rdlc.

The article said that the Microsoft.ReportingServices.ExcelRendering.dll is
modified by the hotfix/sp2. I installed SP2 for SS, but I'm not sure how to
proceed from here. I copied this dll on our server in the bin folder of our
web application (the file wasn't part of our solution before), but users on a
Mac still cannot view the report (Excel just hangs trying to open it).

Any help would be greatly appreciated. Here is the export part of my code
(Asp.Net 2.0):

private void Export(LocalReport report, string format)

Warning[] warnings;
string[] streamids;
string mimeType;
string encoding;
string extension;
string deviceInfo;
string contentType;

switch (format)

case "PDF":

deviceInfo =
contentType = "application/pdf";

case "EXCEL":

deviceInfo =

contentType = "application/vnd.ms-excel";

deviceInfo =

contentType = "application/pdf";

byte[] bytes = report.Render(format, deviceInfo, out mimeType, out encoding,
out extension, out streamids, out warnings);

HttpContext.Current.Response.ContentType = contentType;

if(format == "EXCEL")
HttpContext.Current.Response.AddHeader("Content-disposition", "attachment;


(Server/Remote Mode)

Select Do not timeout report execution in Report Execution Timeout settings in your system

Path is http://<Machine Name>/Reports/Pages/Settings.aspx

And you cant export more than 65K Rows in one report


It seems that your report is quite big as dimensions  (37000 rows x 182 columns), and it should be mentioned here that not only the dimensions of the report are important, but also the complexity. 

I found this post that talks about similar performance issues for Excel renderer:


To avoid being timeout during rendering a report, I would suggest to do this:

- go to Report Manager and render the report

- select Properties - Execution  and from the section Report Execution Timeout choose the option:

Do not timeout report execution



Go to your report, right click on the detail row, and select "Insert Group".  In the "Grouping and Sorting Properties" dialog box, put this in for the expression:  =Int((RowNumber(Nothing) - 1) / 65000)

The 65000 is how many records will be on each sheet when exported to Excel.  Then, check the box, "Page break at end".  Re-run and export your report to Excel, you will have a sheet for each 65000 records.

posted @ 2010-02-19 15:55  emanlee  阅读(2771)  评论(0编辑  收藏  举报