Active Reports 10.1.6726.0 and Recent Windows 10 Update

Posted by: joshb on 20 June 2018, 9:17 am EST

    • Post Options:
    • Link

    Posted 20 June 2018, 9:17 am EST

    After the Windows 10 update last week, the PDF functionality of Active Reports has broken when calling:

    GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export
    

    Exception:

    System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index
       at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.Collections.Generic.List`1.get_Item(Int32 index)
       at DataDynamics.DDLib.PdfEngine.PdfFonts.#RZc(Int32 fontIndex, String fontName, FontStyle fontStyle, Single sizeInPoints, Boolean vertical)
       at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.#7pk(SectionDocument document, Stream stream, String pageRange, Byte[]& xmpMetadata)
       at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, Stream stream, String pageRange)
       at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, String filePath, String pageRange)
       at GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, String filePath)
    
    

    Please advise.

  • Posted 20 June 2018, 8:10 pm EST

    Hello,

    This is the known issue of AR with latest win10 update. We are working on this. Also, could you please share the report with us that causes the error so that we can find the suitable workaround for you.

    Thanks,

    Mohit

  • Posted 25 June 2018, 12:09 am EST

    Hi !

    I have the same problem and the same exception was occuring. Before I use AR6 and I try to migrate to AR12 but this is not working…

    
    System.Collections.Generic.KeyNotFoundException: La clé donnée était absente du dictionnaire.
     à System.ThrowHelper.ThrowKeyNotFoundException()
     à System.Collections.Generic.Dictionary`2.get_Item(TKey key)
     à DataDynamics.DDLib.PdfEngine.PdfFonts.Dispose(Boolean disposing)
     à #mqc.#8qc.Dispose(Boolean disposing)
     à GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.#7pk(SectionDocument document, Stream stream, String pageRange, Boolean withWatermark, Byte[]& xmpMetadata)
     à GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, Stream stream, String pageRange)
     à GrapeCity.ActiveReports.Export.Pdf.Section.PdfExport.Export(SectionDocument document, String filePath, String pageRange)
    
    
  • Posted 25 June 2018, 12:27 am EST

    Hello,

    Could you please share the report with us.

    Thanks,

    Mohit

  • Posted 25 June 2018, 1:17 am EST

    Okay thanks,

    But How can I share this with you ? and can I share the AR6 version ?

  • Posted 25 June 2018, 2:00 am EST

    Hello,

    Yes, you can share the report of any version AR12 or AR6. You can upload the file here in zip format.

    Thanks,

  • Posted 25 June 2018, 5:24 pm EST

    Hi,

    I send you a zip of a AR6.

    AR6_Exception.zip

    Thanks

  • Posted 25 June 2018, 6:06 pm EST

    Hello,

    Could you please try after adding following lines of code after line " this.Sections.Add(this.pageFooter);" in “ArCerfaCSE.Designer.cs” file.

    this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-family: Arial; font-style: normal; text-decoration: none; font-weight: norma" +
                "l; font-size: 10pt; color: Black; text-align: left; vertical-align: top; ddo-cha" +
                "r-set: 1", "Normal"));
                this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-family: Arial; font-size: 16pt; font-style: normal; font-weight: bold", "Heading1", "Normal"));
                this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-family: Times New Roman; font-size: 14pt; font-style: italic; font-weight: b" +
                "old", "Heading2", "Normal"));
                this.StyleSheet.Add(new DDCssLib.StyleSheetRule("font-family: Arial; font-size: 13pt; font-style: normal; font-weight: bold", "Heading3", "Normal"));
    

    Hope it resolves your issue.

    Thanks,

    Mohit

  • Posted 25 June 2018, 7:49 pm EST

    Ok I just tried it and it works !

    So, thank you for your help.

  • Posted 9 April 2019, 7:38 pm EST

    We encountered the exactly same error on AR6 on Win10 latest upgrade.

    Our source already had the lines of code mohitg pointed above.

    Is there anything we can do? You said this is a known issue.

    Do you have an open issue number or thread?

  • Posted 9 April 2019, 7:53 pm EST

    Hello Eisho,

    Ideally, Issue get resolve after replacing the following line of code

    Me.StyleSheet.Add(New DDCssLib.StyleSheetRule("", "Normal"))
    

    with

    Me.StyleSheet.Add(New DDCssLib.StyleSheetRule("font-family: Arial; font-style: normal; 
    text-decoration: none; font-weight: normal; font-size: 10pt; color: Black", "Normal"))
    

    If the issue does not resolve using the above solution, then sorry to mention that you need to upgrade the AR to our latest build as this issue fixed in the latest build of AR.

    Also, AR6 had declared as a legacy product a long time ago and it is out of development mode. Hence, we don’t provide support for AR6. And AR6 does not support Windows 10. AR6 was never tested with Windows 10 as it was not available at the time of AR6 release.

    Hope you understand.

    Thanks

  • Posted 14 April 2019, 5:01 pm EST

    Hello mohitg,

    Thank you so much for the code.

    It actually worked however I have no clue why it solves the problem.

    Did default font style on Win10 changed on recent updates?

  • Posted 14 April 2019, 7:26 pm EST

    Hello,

    Microsoft changes some Font related setting in 1803 that’s why this issue occurred. There are lots of people faces Font related problem in 1803 as mentioned in the following links:

    https://social.technet.microsoft.com/Forums/lync/en-US/40a22a90-1400-4bf5-bfe6-c6dcd77c55aa/windows-10-1803-breaks-custom-fonts?forum=win10itprogeneral

    https://stackoverflow.com/questions/50332942/no-default-font-in-windows-10-1803

    Hope it clarifies.

    Thanks.

Need extra support?

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

Learn More

Forum Channels