I want to build a word report.
I have two data cases: data_yes.json and data_no.json.
(I have enabled the AllowMissingMembers feature.)
However, when I was calculating the subtraction, It reported the wrong:
buildReport Failed:{“RequestId”:“Root=1-6107b8af-39132c372a072f026a2b35d5”,“Error”:{“Code”:“ErrorInvalidInputData”,“DateTime”:“0001-01-01T00:00:00Z”,“Description”:“Operation Failed. The input data is not valid.”,“InnerError”:{“DateTime”:“0001-01-01T00:00:00Z”,“Message”:“An error has been encountered at the end of expression ‘((totalSpace-availSpace)*’. Can not apply operator ‘-’ to operands of type ‘System.Object’ and ‘System.Object’.”},“Message”:“Error while build report”}}
I think when the data is missing,the following logical judgments should be skipped. question1: Is there a way to solve it?(Attached is my sample code.) build_word_report2.zip (16.5 KB)
question2: Sometimes my data looks like this: 10.1.1.1:8080.
When I build the word report,I want to split the string by “:” and get the first element in the array , such as IP 10.1.1.1.
Is there a similar function like “$var.split(’:’)[0]” in LINQ Reporting Engine?
After the initial investigation, we have logged a ticket WORDSCLOUD-1694 for further investigation and rectification. We will keep you updated about the issue resolution progress.
After initial investigation, we have logged a ticket WORDSCLOUD-1695 for further investigation and rectification. We will notify as soon as it is resolved.
About WORDSCLOUD-1964, we have investigated the issue and found it is expected behavior. As per API reference, ReportBuildOptions.AllowMissingMembers makes the engine to treat missing object members as null literals. So the ((totalSpace–availSpace)*100)/totalSpace template expression is treated as ((null–null)*100)/null. If you try to compile an expression like ((null–null)*100)/null using a C# compiler, you get a compile-time error. Similarly, the engine throws an exception, so this is an expected behavior rather than a bug.
The simplest way to work around this restriction is using of a typecast to a nullable numeric type as shown in the attached modified template.
We have investigated the WORDSCLOUD-1695 ticket and fount that as per Microsoft documentation, a string.Split overload accepting a single string argument is available only in the newest versions of .NET. We have tested the scenario using .NET Core 2.1 and it works as expected. If using .NET Core 2.0 or higher is not an acceptable option for you, then you may use another string.Split overload that is available for the .NET version you use.
We fixed the template for the Split method to work correctly. Please see attached document. Hopefully, it will help you to accomplish the task.
The issues you have found earlier (filed as WORDSCLOUD-1694,WORDSCLOUD-1695) have been fixed in this update. This message was posted using Bugs notification tool by Ivanov_John
We are sorry for the inconvenience. We have noticed the issue with 21.10 and we are reopening the related issue for investigation. We will share an update with you asap.