Aspose word linq syntax - In case if condition is false it's compiling that block behind the seen

Aspose word linq syntax - In case if condition is false it’s compiling that block behind the seen do to that facing error

below is the json data and attached is template

{
    "Shipments": [
      {
        "ShipmentItems": [{
           "LineNumber": "1"
           }
        ],
        "Status": "Shipped",
        "SourceLocationName": null,
        "NumberOfItems": "3",
        "ShippedDate": null
      }
    ]
  }

OrderDetails112.docx (32.4 KB)

@Gauravgarg01 LINQ Reporting Engine parses a template document as a whole before evaluating any expression. The engine does not skip parsing of expressions, which are not going to be evaluated according to template logic and data. This is by design.

@alexey.noskov

how we can handle that if in our if data is avaialble conditionaly

@Gauravgarg01 You can try using ReportBuildOptions.AllowMissingMembers. Usually it is enough to handle such situations:
https://docs.aspose.com/words/net/accessing-missing-members-of-data-objects/

@alexey.noskov
If we make these changes will it going to introduce any unkonwn issue ?
As we have some reports running on production

@Gauravgarg01 No, there should not be any problems with using this option. If your template contain a missing member without this option an exception will be thrown. If your existing templates does not throw any exceptions there are no missing members used and ReportBuildOptions.AllowMissingMembers will have no efffect.