Failed to convert parameter value from a DateTime to a Int32

2 posts, 0 answers
  1. James
    James avatar
    12 posts
    Member since:
    Mar 2019

    Posted 19 Apr 2019 Link to this post

    I have a question that is frustrating me.  I am trying to get up a column chart using the following query

    SELECT COUNT( as total_chats, 
           COUNT( as total_leads,
           (SELECT SUM(total_visits) 
    FROM site_visit INNER JOIN site ON = site_visit.site_id 
    WHERE [date] BETWEEN DATEADD(DAY, DATEDIFF(DAY, 0, conversation.conv_start), 0) AND DATEADD(DAY, 1, DATEADD(DAY, DATEDIFF(DAY, 0, conversation.conv_start), 0)) AND site.client_id = @clientId) AS total_visits,
    DATEADD(DAY, DATEDIFF(DAY, 0, conversation.conv_start), 0) as date,
    FROM conversation LEFT OUTER JOIN lead on conversation.lead_id =
                      INNER JOIN site on = conversation.site_id
    WHERE site.client_id = @clientId and conversation.conv_start BETWEEN DATEADD(DAY, 1, DATEADD(MONTH, -6, EOMONTH(@date))) AND DATEADD(DAY, 1, EOMONTH(@date))
    GROUP BY DATEADD(DAY, DATEDIFF(DAY, 0, conversation.conv_start), 0), site.client_id that runs properly in the query configuration tool and populates the design view as expected as evidenced in the attached screenshots.  But when I attempt to run a preview I get the error shown in the third attachment.

    I have checked all of the parameters and don't understand why this error would be coming up.

    Thanks you for helping me understand this error.

    James Wallace

  2. Neli
    Neli avatar
    255 posts

    Posted 24 Apr 2019 Link to this post

    Hello James,

    From the screenshot with the error, I believe that somewhere in the Graph there is an Expression that expects Int parameter and a DateTime is provided instead. You can check whether DataBinding / Sorting / Filtering or any other property/functionality that can take Expressions is causing the error. 
    You can also send us a runnable report demonstrating the issue to investigate locally.

    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top