ClosedXML.Report
ClosedXML.Report copied to clipboard
null-propagation Errors
When I use in template {{np(User.Range, ""Not registred"")}}
I get an error ')' or ',' expected
User
here is null.
If I use {{np(User.Range, null)}}
I get an error The 'np' (null-propagation) function requires the first argument to be a MemberExpression, ParameterExpression or MethodCallExpression
how to use np
correctly?
trying different options, came to this solution:
{{User == null ? "User error" : User.Range.ToString()}}
are there other ways?
Hi.
Try this {{np(User.Range, "Not registred")}}
Same
The 'np' (null-propagation) function requires the first argument to be a MemberExpression, ParameterExpression or MethodCallExpression
Please provide a sample file and reproduction code for I could investigate the issue.
Delete
Close project