I have a C# WinForms application which is generating a .xls type report using the Telerik.Reporting dll.
We are in the process of developing an enhanced version of the application in electron using Angular. We are using EdgeJs to access the reporting features during the transition from the legacy product to the new product. That is, we are running the exact same C# code in both the legacy application and the electron app.
The problem is that the Telerik.Reporting RenderReport method throws an exception, "XLS rendering format is not available", in the electron version of the app, but not in the WinForms version. Here are the relevant lines of code:
var reportSource = new InstanceReportSource { ReportDocument = rpt };
result = processor.RenderReport("XLS", reportSource, null);
rptStream = new FileStream(path + "\\" + rpttmpXlsPath, FileMode.Create);
rptStream.Write(result.DocumentBytes, 0, result.DocumentBytes.Length);
We cannot figure out why this is happening. Here is what we know:
- The data being reported is identical in both cases.
- The C# code being executed is the same in both cases.
- The issue is reproducible on other (non-dev) machines.
- On a single developer machine (Window 7/Excel 2010), the exception does not occur and the report generates as expected. As an added bonus, this machine also contains the Telerik license for developing the reports.
- On another non-dev machine with Windows 7/Excel 2010, we get the same exception.
- We have tested the application on a Windows 7/Excel 2013 machine and got the exception.
- We have tried updating to the latest EdgeJs to no avail.
- We also render the report in PDF which works in both apps.