RadFlowDocument.UpdateFields throws NullReferenceExc

9 posts, 1 answers
  1. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jun 2012

    Posted 14 Jul Link to this post

    Hi,

    I have a simple Word document with JUST a line of text and a DocumentVariable in it, named VAR1. I try to set a value for it in my ASP application, and it works, but when I try to update the field using the UpdateFields() methods, it throws a NullReferenceException. I think it might be a bug in the library, because I tried on several different documents. Can you please help me figure this out? The code it's pretty straightfoward. Maybe it's something wrong with the document?

    DocxFormatProvider docxProvider = new DocxFormatProvider();
    RadFlowDocument document;
                    
    using (Stream input = File.OpenRead(docxFilePath))
        document = docxProvider.Import(input)

    //document.DocumentVariables.Add("VAR_LINE1", "testline1");
    document.DocumentVariables["VAR1"] = "testline1";
    try
    {
         document.UpdateFields(); // throws exception
    } catch (Exception ex) {}

     

    Thank you!

  2. Boyko
    Admin
    Boyko avatar
    17 posts

    Posted 15 Jul Link to this post

    Hello Daniel,

    We are aware of a similar issue, but to be sure this is the case could you please share with us the version of the library you are using. Also, I will appreciate if you could send us the document you are importing. 

    Regards,
    Boyko
    Telerik by Progress

  3. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jun 2012

    Posted 15 Jul Link to this post

    Hi,

    The version of the library is: 2015.3.1111.40, and the .net runtime version: v4.0.30319.

    I attached the docx file with a .jpg extesion, because of the restrictions, simply rename it to the old extension and it should be ok.

    Thank you!

  4. Answer
    Boyko
    Admin
    Boyko avatar
    17 posts

    Posted 18 Jul Link to this post

    Hi Daniel,

    I confirm this is a known issue and it is already fixed in our latest official release: R2 2016 SP1. 

    Regards,
    Boyko
    Telerik by Progress

  5. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jun 2012

    Posted 19 Jul in reply to Boyko Link to this post

    I understand.

    Thank you very much.

    Daniel

  6. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jun 2012

    Posted 27 Jul Link to this post

    Hi Boyko,

    Can you please tell in which file version is this bug fixed? Apparently in 2016.2.421.40 it still throws the error. Isn't this version part of the 2016 SP1 release?

    Thank you!

  7. Boyko
    Admin
    Boyko avatar
    17 posts

    Posted 28 Jul Link to this post

    Hi Daniel,

    2016.2.421.40 is the file version of the R1 2016 Release. The version of the SP1 Release following it is 2016.2.613

    Regards,
    Boyko
    Telerik by Progress

  8. Daniel
    Daniel avatar
    8 posts
    Member since:
    Jun 2012

    Posted 01 Aug in reply to Boyko Link to this post

    Hi Boyko,

    I have just downloaded the brand new UI for ASP, as a trial. I can confirm it is 2016 SP1 (as the installer also said). All the UI dlls are 2.607, but those from the AdditionalLibraries folder are still 2.421 (after a clean install).

    Can you please tell me how can I get the latest document processing libraries, because I still cannot get rid of the exception when I call UpdateFields.

    Thanks!

  9. Boyko
    Admin
    Boyko avatar
    17 posts

    Posted 03 Aug Link to this post

    Hi Daniel,

    Please, excuse me for misleading you. The Document Processing libraries are independent of platform and thus distributed with several of the suites we provide. All of the teams responsible for the different platform suites should test the compatibility between the technology and the Document Processing Libraries. This is the reason why not all suites will release a version of Telerik Document Processing that is up to date with the source code in releases between the official ones.

    I have checked which bundle has the most recent build that includes the fix for the discussed in this thread issue and that is the UI for WPF suite. You could test the fix using the assemblies from this suite or wait for the next official release of UI for ASP.NET AJAX.

    Hope this helps.

    Regards,
    Boyko
    Telerik by Progress

Back to Top