Activereports migration from 11 to 18 issues

Posted by: jamesl on 23 January 2025, 4:18 pm EST

    • Post Options:
    • Link

    Posted 23 January 2025, 4:18 pm EST

    I recently converted my solution from ActiveReports 11 to ActiveReports 18 and when I am viewing many of my reports, I now see the below error on the designer page. Please confirm how I should proceed. Thank you.

    Object of type ‘GrapeCity.ActiveReports.Document.Drawing.Font’ cannot be converted to type ‘GrapeCity.ActiveReports.Design.ArDesigner.Designers.ReportControlDesignerWithFont+FontWrapper’.

    Call stack error - at System.ComponentModel.ReflectPropertyDescriptor.SetValue(Object component, Object value)

    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializePropertyAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement, CodePropertyReferenceExpression propertyReferenceEx, Boolean reportError)

    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeAssignStatement(IDesignerSerializationManager manager, CodeAssignStatement statement)

    at System.ComponentModel.Design.Serialization.CodeDomSerializerBase.DeserializeStatement(IDesignerSerializationManager manager, CodeStatement statement)

  • Posted 24 January 2025, 2:41 am EST

    Hi James,

    This is the first time we are seeing this issue. Can you please share with us a runnable sample replicating the issue so that we can investigate it further and get back to you accordingly?

  • Posted 30 January 2025, 12:38 pm EST

    Hello,

    I see the issue is on any barcodes I have in my solution before the upgrade the code was as follows,

    this.barcode1.Font = new System.Drawing.Font(“Courier New”, 8F);

    After the upgrade the updated code generated was below

    this.barcode1.Font = new GrapeCity.ActiveReports.Document.Drawing.Font(“Courier New”, 8F);

    The upgraded code is what is causing the issue with the viewer. However when I comment out the line of code, the error is removed from the viewer and the barcode appears to render without issue. I do see any new barcodes created, do not contain the code this.barecode1.font, so I would suspect that code is not being utilized going forward for barcode renderings.

  • Posted 30 January 2025, 10:16 pm EST

    Hi James,

    We tested setting the Font property at our end in the code-based Scetion Report in v18, and it worked with no errors. Please see the attached sample that we tested with.

    If the issue persists at your end, please provide us with a stripped-down and runnable sample report with sample data replicating the issue so that we can investigate the same at our end and get back to you accordingly.

    Attachment:

    BarcodeSample.zip

Need extra support?

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

Learn More

Forum Channels