CommandParameter: Failed to convert parameter value from a Variant to a DateTimeOffset
Dear Fast-Report team,
I'm trying to create a report with a datetimeoffset parameter (CommandParameter) from the wizard, but when I click "next" I get this error:
"Failed to convert parameter value from a Variant to a DateTimeOffset".
I read here: https://www.fast-report.com/en/forum/index....?showtopic=5726, that a default value is needed.
So I tried the following default values... with no success:
- 1/1/2000
- '1/1/2000'
- "1/1/2000"
- [Date]
- NULL
- System.DBNull.Value
From all reports I could find in "FastReport.Net\Demos\Reports", there's only one example using CommandParameter, but it's integer... not really helpful samples here.
Could you please help?
Note: I'm using version 2017.3.0
Best regards,
nba
I'm trying to create a report with a datetimeoffset parameter (CommandParameter) from the wizard, but when I click "next" I get this error:
"Failed to convert parameter value from a Variant to a DateTimeOffset".
I read here: https://www.fast-report.com/en/forum/index....?showtopic=5726, that a default value is needed.
So I tried the following default values... with no success:
- 1/1/2000
- '1/1/2000'
- "1/1/2000"
- [Date]
- NULL
- System.DBNull.Value
From all reports I could find in "FastReport.Net\Demos\Reports", there's only one example using CommandParameter, but it's integer... not really helpful samples here.
Could you please help?
Note: I'm using version 2017.3.0
Best regards,
nba
Comments
date:
<CommandParameter Name="Parameter" DataType="7" DefaultValue="1998-12-31"/>
datetime:
<CommandParameter Name="Parameter" DataType="7" DefaultValue="1998-12-31 00:00:00"/>
I tried ISO8601 format (yyyy-mm-ddThh:mi:ss.mmmZ) or any other SSMS formats, but it simply doesn't work.
By the way with Date or DateTime any formats works (like 01/01/2000)...
Any idea?
https://docs.microsoft.com/en-us/sql/t-sql/...et-transact-sql
Did you try to create a DateTimeOffset CommandParameter with a DefaultValue from the wizard and click "Next"?
if you insist the wizard, use varchar datatype and defaultvalue = 2017-12-31 12:35:29.1234567 +12:15
or