5

我希望有人可以帮助我。这太痛苦了。我已经花了数天时间在这上面,我的客户变得越来越沮丧。:(

我在 Azure 网站和 SQL Azure 上托管。我正在使用报告程序集的 v.10。在 Azure 之外一切正常(本地主机,没问题)

我在用户控件中的 ASP.NET 中有一个 ReportViewer。ReportViewer 和 RDLC 非常适合显示和导出到 Excel/Word,但是我在 IE 中导出和打印 PDF 时遇到问题。

打印时:

提示:打印时出错。(0x80004005)

网页错误详情

用户代理:Mozilla/4.0(兼容;MSIE 7.0;Windows NT 6.1;WOW64;Trident/5.0;SLCC2;.NET CLR 2.0.50727;.NET CLR 3.5.30729;.NET CLR 3.0.30729;.NET4.0C; .NET4.0E;InfoPath.3) 时间戳:2013 年 4 月 24 日星期三 03:18:56 UTC

消息:未指定的错误。行:1058 字符:13 代码: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 请求期间发生未处理的异常。请查看堆栈跟踪以获取有关错误及其源自代码的位置的更多信息。

异常详细信息:System.ArgumentException:参数无效。

源错误:

在执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪来识别有关异常起源和位置的信息。

堆栈跟踪:

[ArgumentException: 参数无效。]
System.Drawing.Graphics.GetHdc() +1143305
Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +57
Microsoft.ReportingServices.Rendering.RichText.TextBox.MeasureFullHeight(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Single& contentHeight) +500
Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem,列表1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +381
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 个祖先,Boolean& anyAncestorHasKT,Boolean hasUnpinnedAncestors,Nullable 1 detailCellsState,PageContext pageContext) +1081 sourceWidth) +695
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.TraverseColumnMembers(Tablix tablix, TablixMember colMemberParent, Int32 parentColIndex, RowInfo currRowInfo, Boolean create, Double startInTablix, Double endInTablix, Int32& detailCellIndex, Int32& visibleSpan, List 1& pageStructMemberCell, Boolean ignoreTotals, Boolean&finish parentHasFooters, CreateItemsContext createItems, Double startInTablix, Double endInTablix, PageContext pageContext) +2310 Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixItems(Tablix tablix, PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix) +1131 detailCellsState, PageContext pageContext) +869
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 pageContext,CreateItemsContext createItems,Double startInTablix,Double endInTablix,Double topInParentSystem)+286
Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.DetermineVerticalSize(PageContext pageContext,Double topInParentSystem,Double bottomInParentSystem,列出1 个祖先,布尔值& anyAncestorHasKT,布尔值 h​​asUnpinnedAncestors,Nullable 1 个祖先,布尔值& anyAncestorHasKT,布尔值 h​​asUnpinnedAncestors,布尔值 resolveState,布尔值 resolveItem) +273 Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +646
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 sourceWidth) +695
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineContentVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List
1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +145
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List
1 个祖先,布尔值& anyAncestorHasKT,布尔值 h​​asUnpinnedAncestors,Nullable 1 个祖先,布尔值& anyAncestorHasKT,布尔值 h​​asUnpinnedAncesKT) +53 Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 page, Int32 totalPages) +659 Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(报告报告, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) +1411 sourceWidth) +695
Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List


Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.NextPage() +52 Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.Init(报告报告,PaginationSettings 分页,CreateAndRegisterStream createAndRegisterStream,Hashtable& renderProperties)+348

Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(报告报告,NameValueCollection reportServerParameters,NameValueCollection deviceInfo,NameValueCollection clientCapabilities,Hashtable& renderProperties,CreateAndRegisterStream createAndRegisterStream)+61

[LocalProcessingException: 本地报表处理过程中发生错误。]
Microsoft.Reporting.WebForms.LocalReport.InternalRender(String format, Boolean allowInternalRenderers, String deviceInfo, PageCountMode pageCountMode, CreateAndRegisterStream createStreamCallback, Warning[]& warnings) +333
Microsoft.Reporting.WebForms .LocalModeSession.RenderReport(字符串格式,布尔 allowInternalRenderers,字符串 deviceInfo,NameValueCollection AdditionalParams,布尔 cacheSecondaryStreamsForHtml,String& mimeType,String& fileNameExtension)+215
Microsoft.Reporting.WebForms.ExportOperation.PerformOperation(NameValueCollection urlQuery,HttpResponse 响应)+154
Microsoft.Reporting。 WebForms.HttpHandler.ProcessRequest(HttpContext 上下文)+216
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +341 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69

-------------------------------------------------- ------------------ 版本信息:Microsoft .NET Framework 版本:4.0.30319;ASP.NET 版本:4.0.30319.17929

谢谢你。

4

3 回答 3

4

我今天发布到 Azure 网站(应用程序)时遇到了同样的问题。通过将站点从免费迁移到基本应用程序服务计划层解决了问题。

于 2015-04-15T11:41:40.320 回答
3

WAWS 上的安全配置实际上不支持 PDF 生成,在这种情况下,您应该在虚拟机上使用 WebRole 或 Web 服务器。谢谢!尼尔(WAWS 团队)

于 2013-04-24T18:38:41.097 回答
0

另一种可能性可能是dlls云上的失踪。对于报告,您已经引用了Microsoft.Reporting.Webformsdll,该 dll 在本地存储在本地驱动器上,并且在您将应用程序部署到云上时不会被打包。所以,我们也应该dlls在云上复制/上传/部署这些。

于 2013-05-23T05:57:48.207 回答