i have small problem to display the date range in report header am following this way but its showing some error like"Operand type are in compatible with the operator".But my variable is date type only can you please any one give some suggestions.
Please check in this querey(this.query().dataSourceTable(tablenum(PurchLine)).range(2).value() with the following things
whether range(2) is pointing to the date field. or better specify the field by makinf use of fieldNum(). or Please verify your 2nd range in datasource should be of date type.
cross verify the deliveryDate variable is of type date, might be it is UTCDateTime variable
QueryBuildRange.value() accepts and returns strings only. If you’re specifying the value, you usually use queryValue(), queryRange() etc., if you want to convert it back, you have to parse it yourself.
It’s not to as easy as you think - value() can return for example “01/01/2012”…“31/01/2012”. How do you want to convert it to single date?
But if you just want to display it in a report, you may simply show the string value itself.
If you have just a single date in the range, e.g. the filter value is “01/01/2012”, you could parse it to date data type - remove quotes around the value and call str2date() to do the conversion. The problem is that not all ranges represent a single date, therefore the conversion is simply not possible in some cases.
i got the solution for this date Range last week.I.e we will return the date as a string it will print in header. i.e declare datefiled like Str transdate,
and return the same str then only it will print in header
this query return all transaction records…in that date range but while u selecting the acc no or other think then it willl not working…all acc no data showing how to show on selective acc no info in that range