Free Support Forum - aspose.com

LINQ Reporting Engine | Parse Comma Separated Numbers Date Time in JSON Data Source C# .NET | Word Documents

We are trying to populate table using LINQ reporting engine, while passing JSON Input1 data, For value of “RDINSTLNBR” = “1,2” it generates DateTime instead of 1,2 as shown in OUTPUT1.
But if we pass JSON Input2 then it generates correctly as shown in OUTPUT2:

JSON Input1:
string json1 = @"
{
““TaxId””: "“20-11-311-018-0000"”,
““RDAGENCYNM””: ““RIVERSIDE COUNTY””,
““TaxDetails””: [
{
““RDTATAXBILLYR””: ““2015/2016"”,
““RDINSTLNBR””: ““1,2"”,
““RDTAXAMT””: “”$8,966.04"”
}
]
}”;

OUTPUT1:
–Number-- Year/Installment Amount ----Authority----
20-11-311-018-0000 2015/2016/1/2/2020 12:00:00 AM $8,966.04 RIVERSIDE COUNTY

JSON Input2:
string json2 = @"
{
““TaxId””: "“20-11-311-018-0000"”,
““RDAGENCYNM””: ““RIVERSIDE COUNTY””,
““TaxDetails””: [
{
““RDTATAXBILLYR””: "“2015/2016"”,
““RDINSTLNBR””: ““1"”,
““RDTAXAMT””: “”$5486.32"”
},
{
““RDTATAXBILLYR””: ““2015/2016"”,
““RDINSTLNBR””: ““1,2"”,
““RDTAXAMT””: “”$7528"”
}
]
}”;

OUTPUT2:
–Number-- Year/Installment Amount ----Authority----
20-11-311-018-0000 2015/2016/1 $5486.32 RIVERSIDE COUNTY
20-11-311-018-0000 2015/2016/1,2 $7528 RIVERSIDE COUNTY

@mstc,

To ensure a timely and accurate response, please ZIP and attach the following resources here for testing:

  • Your simplified input Word document(s)
  • Aspose.Words for .NET 20.5 generated output DOCX file(s) showing the undesired behavior
  • Your expected DOCX file(s) showing the desired outputs. You can create these documents by using MS Word.
  • Please also create a standalone simple Console application (source code without compilation errors) that helps us to reproduce your current problem on our end and attach it here for testing. Please do not include Aspose.Words DLL files in it to reduce the file size.

As soon as you get these pieces of information ready, we will start investigation into your scenario and provide you more information. Thanks for your cooperation.

Thank you,
We have also procured a license to ASPOSE.Words, let us know if more info regarding that is required to move things faster.

It seems that the JSON data source tries to predict data type by inspecting values and that’s where it is getting it wrong. Please let us know if there any way configure that prediction. or tell the engine to treat strings as strings.

We found that it treats a string of digits as an integer. This is very dangerous when leading zeros are important. Please let us know how we can handle such scenarios.

This can potentially become a showstopper for us so we need your help as soon as possible. PFA the sample code to reproduce this. AsposeForumSample.zip (5.0 MB)

@mstc,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of any correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20488. We will further look into the details of this problem and will keep you updated on the status of the linked issue. We apologize for your inconvenience.

Can you suggest any work around? We need some solution by the time you fix this.

A post was split to a new topic: Comma separated numbers in JSON data source treated as date by LINQ reporting engine