This is a migrated thread and some comments may be shown as answers.

RadFlowDocument.UpdateFields throws NullReferenceExc

8 Answers 71 Views
WordsProcessing
This is a migrated thread and some comments may be shown as answers.
Daniel
Top achievements
Rank 1
Daniel asked on 14 Jul 2016, 08:58 AM

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!

8 Answers, 1 is accepted

Sort by
0
Boyko
Telerik team
answered on 15 Jul 2016, 01:45 PM
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

0
Daniel
Top achievements
Rank 1
answered on 15 Jul 2016, 02:22 PM

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!

0
Accepted
Boyko
Telerik team
answered on 18 Jul 2016, 01:11 PM
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

0
Daniel
Top achievements
Rank 1
answered on 19 Jul 2016, 08:22 AM

I understand.

Thank you very much.

Daniel

0
Daniel
Top achievements
Rank 1
answered on 27 Jul 2016, 06:43 AM

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!

0
Boyko
Telerik team
answered on 28 Jul 2016, 12:22 PM
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

0
Daniel
Top achievements
Rank 1
answered on 01 Aug 2016, 08:47 AM

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!

0
Boyko
Telerik team
answered on 03 Aug 2016, 08:24 AM
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

Tags
WordsProcessing
Asked by
Daniel
Top achievements
Rank 1
Answers by
Boyko
Telerik team
Daniel
Top achievements
Rank 1
Share this question
or