2014-09-26 1 views
1

Windows Azure 웹 역할에서 실행되는 ASP.NET MVC (Razor View Engine 및 C#) 응용 프로그램이 있습니다.RDLC 사용자 정의 글꼴 보고서 - 오류 COM 구성 요소 호출에서 HRESULT E_FAIL이 반환되었습니다.

저는 RDLC 로컬 보고서를 사용하여 인쇄 가능한 가격표가있는 pdf 파일을 각각의 바코드로 만듭니다.

시작 작업을 사용하여 바코드 글꼴 (TrueType)을 설치 한 후 Azure에서 작업했습니다. 최근에,이 기능과 관련된 사항을 변경하지 않고도 작업이 중단되었습니다.

다음 오류가 발생하며 지금까지 해결책을 찾지 못했습니다. PDF는 Arial과 같은 표준 글꼴로 잘 생성되기 때문에 문제는 바코드 글꼴이라는 것을 알고 있습니다. 또한 내 컴퓨터에서 로컬로 응용 프로그램을 실행할 때 바코드와 완벽하게 작동합니다.

Error HRESULT E_FAIL has been returned from a call to a COM component. 

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Runtime.InteropServices.COMException: Error HRESULT E_FAIL has been returned from a call to a COM component. 

Source Error: 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

Stack Trace:  

[COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.] 
    System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) +0 
    Microsoft.ReportingServices.Rendering.RichText.TextRun.ShapeAndPlace(Win32DCSafeHandle hdc, FontCache fontCache) +1450 
    Microsoft.ReportingServices.Rendering.RichText.TextRun.GetWidth(Win32DCSafeHandle hdc, FontCache fontCache, Boolean isAtLineEnd) +30 
    Microsoft.ReportingServices.Rendering.RichText.LineBreaker.GetLine(Paragraph paragraph, TextLine line, Win32DCSafeHandle hdc, FontCache fontCache, FlowContext flowContext, Single left, Single right, Single height, Stack`1 lineRunsIndex, Stack`1 lineRunsCharIndex, Int32 lineIndents) +266 
    Microsoft.ReportingServices.Rendering.RichText.LineBreaker.FlowParagraph(Paragraph paragraph, Directions direction, Win32DCSafeHandle hdc, Single dpiX, FontCache fontCache, FlowContext flowContext, Boolean keepLines, SizeF flowContextSize, Int32& contentOffset) +768 
    Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Win32DCSafeHandle hdc, Single dpiX, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +617 
    Microsoft.ReportingServices.Rendering.RichText.LineBreaker.Flow(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Boolean keepLines, Single& height) +182 
    Microsoft.ReportingServices.Rendering.RichText.TextBox.MeasureFullHeight(TextBox textBox, Graphics g, FontCache fontCache, FlowContext flowContext, Single& contentHeight) +759 
    Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.CalculateVerticalSize(PageContext pageContext) +467 
    Microsoft.ReportingServices.Rendering.HPBProcessing.TextBox.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +35 
    Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +977 
    Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.AddRowMember(TablixMember rowMember, Int32 colIndex, Int32 rowSpan, Int32 colSpan, LevelInfo childInfo, PageContext pageContext, Double updateWidth) +1104 
    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) +4255 
    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) +3657 
    Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixRows(Tablix tablix, TablixMember rowMemberParent, Int32 defTreeLevel, Boolean parentBorderHeader, Int32 parentRowIndex, Int32 parentColIndex, List`1& pageStructMemberCell, Boolean ignoreTotals, Boolean& finishLevel, Boolean parentHasFooters, CreateItemsContext createItems, Double startInTablix, Double endInTablix, PageContext pageContext) +4341 
    Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateTablixItems(Tablix tablix, PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix) +239 
    Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.CreateVertically(PageContext pageContext, CreateItemsContext createItems, Double startInTablix, Double endInTablix, Double topInParentSystem) +374 
    Microsoft.ReportingServices.Rendering.HPBProcessing.Tablix.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +662 
    Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +977 
    Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineContentVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Boolean resolveState, Boolean resolveItem) +496 
    Microsoft.ReportingServices.Rendering.HPBProcessing.PageItemContainer.DetermineVerticalSize(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors) +281 
    Microsoft.ReportingServices.Rendering.HPBProcessing.PageItem.CalculateVertical(PageContext pageContext, Double topInParentSystem, Double bottomInParentSystem, PageItem[] siblings, List`1 ancestors, Boolean& anyAncestorHasKT, Boolean hasUnpinnedAncestors, Nullable`1 sourceWidth) +977 
    Microsoft.ReportingServices.Rendering.HPBProcessing.ReportSection.NextPage(RPLWriter rplWriter, Int32 pageNumber, Int32 totalPages, Double top, Double availableHeight, ReportSection nextSection, Boolean isFirstSectionOnPage) +1382 
    Microsoft.ReportingServices.Rendering.HPBProcessing.Report.NextPage(RPLWriter rplWriter, Int32 totalPages) +384 
    Microsoft.ReportingServices.Rendering.HPBProcessing.HPBProcessing.GetNextPage(RPLReport& rplReport) +437 
    Microsoft.ReportingServices.Rendering.ImageRenderer.PDFRenderer.Render(Report report, NameValueCollection deviceInfo, Hashtable renderProperties, CreateAndRegisterStream createAndRegisterStream) +1021 
    Microsoft.ReportingServices.Rendering.ImageRenderer.RendererBase.Render(Report report, NameValueCollection reportServerParameters, NameValueCollection deviceInfo, NameValueCollection clientCapabilities, Hashtable& renderProperties, CreateAndRegisterStream createAndRegisterStream) +93 

내 소스 코드 :

LocalReport report = new LocalReport(); 
// Rdlc file path 
report.ReportPath = Server.MapPath("~/Reports/PriceTags.rdlc"); 

// Data source 
report.DataSources.Add(new ReportDataSource("productsDataSet", dataset1)); 

// Some parameters 
ReportParameterCollection reportParameters = new ReportParameterCollection(); 
reportParameters.Add(new ReportParameter("currency", "EUR")); 
reportParameters.Add(new ReportParameter("precision", 2)); 
report.SetParameters(reportParameters); 

// FileContentResult GenPdf(LocalReport report, string filename) 
return GenPdf(report, "Price Tags"); 

이 문제에 어떤 도움을 어떤 문법 실수에 대한 환영과 유감이 될 것입니다.

미리 감사드립니다.

답변

1

원격 데스크톱을 통해 내 웹 역할의 가상 컴퓨터에 액세스하고 간단한 REBOOT를 수행하여 문제를 해결할 수있었습니다.

감사합니다.