My environment
- Telerik Report Designer, v16.2.22.914, Target Framework: NET 6.0
- database: PostgreSQL
- data provider: Npgsql version: 6.0.7
- 1 database table named 'facilities' with columns:
- billing_month: timestamp
- facility_id: varchar(16)
- 1 report parameter defined as
- name: BillingMonth
- type: DateTime
- Value: 6/1/2019
- 1 data source defined as
- name: facilities
- sql: "select billing_month schema.facilities where billing_month = @BillingMonth"
1 data source parameter defined as:
name: @BillingMonth
DbType: DateTime2
value: = Parameters.BillingMonth.Value
1 design time parameter defaulted to
name: @BillingMonth
Constant Value: 6/1/2019
The Issue
When I click "Execute Query" on the preview data source results screen in the configure SQL Data Source wizard am presented with an error such as: Can't write CLR type System.String with handler type TimestampTzHandler or Can't write CLR type System.String with handler type TimestampHandler.
If I dismiss the error and hit "Finish" Data explorer will not show the data fields but instead displays the same error with a rather long stack trace.
Interestingly enough, the report may still work, but design time assistance is unavailable. For example I cannot drag data source fields to the report. To validate I created another data source for the list of unique billing months, assigned that to "AvailableValues" of the BillingMonth report parameter, and set Visible to True. I can then select from an appropriate month in the report Preview and run the report.
My Question
What is the appropriate format to specify a DateTime constant value in the design time parameters window of the Configure SQL Data Source wizard?
Previously, when we were targeting oracle specifying M/D/YYYY worked fine but as we're retargeting PostgreSQL we find ourselves with this mystery.