FlexReport internal error while report rendering: System.InvalidCastException

Posted by: info on 1 November 2017, 3:50 am EST

  • Posted 1 November 2017, 3:50 am EST


    A customer is receiving the following internal error when a FlexReport is rendering:

    System.InvalidCastException: Specified cast is not valid.
    at C1.Util.DX.ComObject.QueryInterface(Guid guid, IntPtr& outPtr)
    at C1.Util.DX.ComObject.QueryInterface[T]()
    at C1.Win.C1Document.Util.C1DXTextLayout..ctor(IC1DXTextLayoutOwner owner)
    at C1.Win.C1Document.Util.C1DXTextMeasurementContext..ctor()
    at C1.Win.FlexReport.C1FlexReport.InitializeRendering(IExecutionContext context)
    at C1.Win.FlexReport.C1FlexReport.InternalRender(IExecutionContext context)
    at C1.Win.FlexReport.C1FlexReport.InternalGenerate(IExecutionContext context)
    at C1.Win.C1Document.C1DocumentSource.Generate()
    at C1.Win.FlexReport.C1FlexReport.Render()

    This is on a Windows 7 desktop.

    I can see another user with the same problem with IIS under the topic 'PDF Export in Azure WebApps' in Google's cash of your RSS feed. However I cannot find the original topic or a solution to it.

    Please advise...
  • Marked as Answer

    Replied 2 November 2017, 7:33 pm EST

    We are sorry for the delayed response.
    Could you share the report with dummy data that is causing to an internal error? Also, please share the Application type, system configuration and build version you are using.

    We are unable to investigate until we are able to replicate the issue at our end without causing report.

  • Replied 9 November 2018, 6:37 am EST

    We got the same error reported by customers after migrating from C1Report to C1FlexReport. The customer machines with the issue were running Windows 7 SP1.

    When trying to display the report to a C1FlexViewer, got a simlar error and the viewer displayed a message that Windows 7 SP1 with Platform Update were needed to display the report.

    Installed the Platform Update for Windows 7 SP1 and it fixed the problem.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels