I have this code:
On this last line (the RenderReport call) I get this exception:
Which contains an inner exception:
This was working before I upgraded from Windows 8 to WIndows 8.1. I upgraded to the latest reporting version, which did not help. I am not sure why it is trying to access OpenXml when I am asking it to generate a PDF.
ReportProcessor reportProcessor =
new
ReportProcessor();
Hashtable deviceInfo =
new
Hashtable();
var source =
new
InstanceReportSource { ReportDocument = report };
RenderingResult result = reportProcessor.RenderReport(
"PDF"
, source, deviceInfo );
On this last line (the RenderReport call) I get this exception:
The type initializer
for
'Telerik.Reporting.OpenXmlRendering.Wordprocessing.WordprocessingReport'
threw an exception.
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at System.Activator.CreateInstance(Type type)
at Telerik.Reporting.Processing.ExtensionManagerBase.CreateExtensionInfo(String typeName, String extensionName)
Which contains an inner exception:
Could not load file or assembly
'DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
or one of its dependencies. The system cannot find the file specified.
":"
DocumentFormat.OpenXml, Version=2.0.5022.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35
at Telerik.Reporting.OpenXmlRendering.Wordprocessing.WordprocessingReport..cctor()
This was working before I upgraded from Windows 8 to WIndows 8.1. I upgraded to the latest reporting version, which did not help. I am not sure why it is trying to access OpenXml when I am asking it to generate a PDF.