我希望有人能帮助我。我要死了。我花了数小时甚至数天的时间在这件事上,而我的客户却越来越沮丧。(
我在Azure网站和SQL Azure上托管。我正在使用报告程序集的v.10。在Azure之外一切都运行良好(localhost,没有问题)
我有一个ReportViewer在ASP。. NET中的用户控件。ReportViewer和RDLC可以完美地显示和导出到Excel/Word,但是我在IE中导出PDF和打印时有问题。
印刷时:
提示:打印过程中出现错误。(0 x80004005)
和
网页错误详情
User Agent: Mozilla/4.0 (compatible;MSIE 7.0;Windows NT 6.1;WOW64;三叉戟/5.0;SLCC2;.net CLR 2.0.50727;.net CLR 3.5.30729;netCLR 3.0.30729;.NET4.0C;.NET4.0E;时间戳:星期三,4月24日2013 03:18:56 UTC
消息:未指定错误。Line: 1058 Char: 13 Code: 0 URI:http://XXXXXXX.azurewebsites.net/Reserved.ReportViewerWebControl.axd?OpType=Resource& Version = 10.0.40219.329& Name = ViewerScript
.axd的第1058行是:
printObj.Print (printInfo。PrintRequestPath printInfo。PrintRequestQuery printInfo.ReportDisplayName);
导出为PDF时:
'/'应用程序服务器错误。
参数无效。描述:发生了一个未处理的异常在执行当前web请求期间。请参阅堆栈跟踪以获取有关错误及其位置的更多信息起源于代码。
Exception Details: System。ArgumentException:参数不合法
源错误:
的过程中产生了一个未处理的异常当前的web请求。关于来源和地点的信息可以使用下面的异常堆栈跟踪来识别异常。堆栈跟踪:
System.Drawing.Graphics.GetHdc() +1143305microsoft . reportingservices . rendering . richtext . linebreak . flow (TextBox . view . view . view . view)[ArgumentException: Parameter not valid.textBox, Graphics, FontCache, FlowContext, FlowContext,Boolean keepLines, Single&高度)+ 57
Microsoft.ReportingServices.Rendering.RichText.TextBox.MeasureFullHeight(文本框textBox, Graphics, FontCache, FlowContext, FlowContext,Single&contentHeight) + 500
Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.DetermineVerticalSize (PageContextpageContext,双topInParentSystem,双bottomInParentSystem,列出1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +381
1祖先,布尔型;anyAncestorHasKT,
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List1 sourceWidth) +695
1 detailCellsState;PageContext PageContext) +108
Microsoft.ReportingServices.Rendering.HPBProcessing.RowInfo.CalculateVerticalLastDetailCell(PageContext context, Boolean firstTouch, Boolean delayCalc) +411
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailCell(Tablix tablix, TablixMember colMemberParent, Int32 colGridIndex, RowInfo rowInfo, PageContext pageContext) +822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List
microsoft . reportingservices . rendering . hpbprocessing .Tablix. traversecolummembers (Tablixtablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfocurrRowInfo,布尔创建,双starttintablix,双endInTablix,Int32&detailCellIndex Int32&visblespan, List1 detailCellsState, PageContext pageContext) +869
1&pageStructMemberCell, Boolean,忽略总数,Boolean&parentHasFooters, CreateItemsContext双starttintablix,双endInTablix, PageContext PageContext)+ 2310 Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixItems (TablixCreateItemsContext, createItems,双starttintablix,双endInTablix) +113
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateDetailRow(Tablix tablix, TablixMember rowMemberParent, Int32 parentRowIndex, Int32 parentColIndex, PageContext pageContext) +292
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +137
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +2822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +2822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateRowMemberChildren(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, Int32 sourceIndex, Boolean resetContext, Boolean parentHasFooters, LevelInfo parentLevelInfo, PageContext pageContext) +2822
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixRows(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, List
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateVertically(PageContext . htmpageContext, CreateItemsContext, createItems, Double starttintablix,双endInTablix,双topInParentSystem) +286
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.DetermineVerticalSize(PageContext . size)pageContext,双topInParentSystem,双bottomInParentSystem,列出1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +646
- 1祖先,布尔&;anyAncestorHasKT,可为空的
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List1 sourceWidth) +695
1祖先,布尔&anyAncestorHasKT,布尔hasUnpinnedAncestors, Boolean resolveState, Boolean resolveItem) +273Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineVerticalSize (PageContextpageContext,双topInParentSystem,双bottomInParentSystem,列出
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineContentVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +145
1祖先,布尔&anyAncestorHasKT,可为空的
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List1 sourceWidth) +695
1祖先,布尔&anyAncestorHasKT,
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter . RPLWriter .rplWriter, Int32 page, Int32 totalPages) +659
Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.NextPage()+ 52 Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.Init(报告报告,PaginationSettings分页,CreateAndRegisterStreamcreateAndRegisterStream Hashtable&renderProperties) + 348
Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(报告报告,NameValueCollection deviceInfo, Hashtable renderProperties,
microsoft . reportingservices . renderer . imagerender . rendererbase . render(报告NameValueCollection reportServerParametersNameValueCollection deviceInfo, NameValueCollectionclientCapabilities Hashtable&renderProperties,CreateAndRegisterStream) +61[LocalProcessingException:一个错误发生在本地报告。处理。]
Microsoft.Reporting.WebForms.LocalReport。InternalRender(字符串格式,Boolean allowInternalRenderers, String deviceInfo, PageCountModecreateStreamCallback警告[],警告)+ 333
Microsoft.Reporting.WebForms.LocalModeSession.RenderReport(字符串格式,Boolean allowInternalRenderers, String deviceInfo,NameValueCollection additionalParams,布尔值cacheSecondaryStreamsForHtml String&mimeType, String&fileNameExtension) + 215
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation (NameValueCollection
Microsoft.Reporting.WebForms.HttpHandler.ProcessRequest(HttpContext . urlQuery, HttpResponse response) +154上下文)+ 216
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute ()+ 341 System.Web.HttpApplication。ExecuteStep(IExecutionStep step, Boolean&completedSynchronously) + 69-------------------------------------------------------------------------------- 版本信息:微软的。net Framework版本:4.0.30319;ASP。净版:4.0.30319.17929
谢谢。
我今天在Azure网站(应用程序)上发布时遇到了同样的问题。通过将站点从FREE迁移到BASIC应用程序服务计划层,问题得到了解决。
在WAWS的安全配置中实际上不支持PDF生成,在这种情况下,您应该使用WebRole或虚拟机上的Web服务器。谢谢!Nir (WAWS team)
另一种可能是云上缺失的dlls
。对于报告,您已经引用了Microsoft.Reporting.Webforms
dll,它在本地存储在本地驱动器上,并且在将应用程序部署到云上时不会打包。所以,我们也应该复制/上传/部署这些dlls
在云上。