Saphirah
Active member
- Local time
- Today, 11:00
- Joined
- Apr 5, 2020
- Messages
- 163
Hello everyone, i am creating a report which displays customers and their orders.
For this i am using a report containing a subreport, which lists all the orders.
Whenever i open the page preview everything works fine, the orders is listed the correct way.
But whenever i try to print or open the report in report view i get the following error
So i noticed when i remove the field "DueDate" from my expression the code works fine. A little context:
The order has a date field called "CreationDate" and the Customer has a numeric field called PayTarget, which correspons to the amount of days the customer has to pay his bills.
For the "DueDate" i am using the DateAdd("d";PayTarget;CreationDate). This should calculate the day the customer has to pay the bill.
Then i am FILTERING the Report on the DueDate Field using 2 Conditions:
[DueDate] >= #01/09/2021# And [DueDate] <= #03/09/2021#
Is this the correct way to do it? Is there a problem with the filter? Is there maybe a different way to calculate the due date?
Thank you very much for your help!
For this i am using a report containing a subreport, which lists all the orders.
Whenever i open the page preview everything works fine, the orders is listed the correct way.
But whenever i try to print or open the report in report view i get the following error
Code:
This expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables.
So i noticed when i remove the field "DueDate" from my expression the code works fine. A little context:
The order has a date field called "CreationDate" and the Customer has a numeric field called PayTarget, which correspons to the amount of days the customer has to pay his bills.
For the "DueDate" i am using the DateAdd("d";PayTarget;CreationDate). This should calculate the day the customer has to pay the bill.
Then i am FILTERING the Report on the DueDate Field using 2 Conditions:
[DueDate] >= #01/09/2021# And [DueDate] <= #03/09/2021#
Is this the correct way to do it? Is there a problem with the filter? Is there maybe a different way to calculate the due date?
Thank you very much for your help!