This error occurs when a given TDL expression(%s) is not understandable or invalid.
Write a valid TDL expression.
Example
[#Menu: Gateway of Tally]
Add: Item: "MyReport" :Display: MyReport : If ##MyVar then Yes Else
[Report: MyReport]
Use: Balance Sheet
[System: Variables]
Variable: MyVar: Logical
The expression If ##MyVar then Yes Else is incomplete, hence the message error T0041: Invalid TDL Expression - If ##MyVar then Yes Else .
The code is corrected by completing the TDL expression.
[#Menu: Gateway of Tally]
Add: Item: "MyReport" :Display: MyReport : If ##MyVar then Yes Else No
[Report: MyReport]
Use: Balance Sheet
[System: Variables]
Variable: MyVar: Logical