Good day,
is there an option to print a report even if variables or fields are missing (i.e. ignore any errors)? Or provide default values for missing fields?
There are 2 options that are related, but do not help with the above mentioned problem:
LlOption.NoParameterCheck and LlOption.NoNoTableCheck.
I am trying to add a backup solution in case of errors.
If the data structure for printing/exporting is missing for List & Label the output cannot be as expected. But what kind of report with the wrong data structure would you expect? What should then be displayed in a meaningful way? Does the report still have a meaningful use if the data structure and the data do not fit the used project?
The only thing that would come to mind is if, in the event of an error/exception, you then can try to query the data structure with LL.Core.LlGetUsedIdentifiers and then create a dummy data object (JSON, XML, DataSet, etc.) and then use it to execute the print “again”. But it is hard to believe whether the report is still really useful. The user should at least receive a warning for this dissmatch between project and data structure.
Addendum:
However, if only a few fields are affected in the design and you know them and know how to deal with them in detail, you can still use the two functions Exists() and GetValue() combined in the layout - example:
If(Exists("<MyFieldName>"), GetValue("<MyFieldName>"), "<MyFallbackValue>")