This is a migrated thread and some comments may be shown as answers.

Object cannot be cast from DBNull to other types

1 Answer 144 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mex
Top achievements
Rank 1
Mex asked on 17 Mar 2011, 05:17 PM
I have a report that depends on database made of not null and null values which are updated by different users in different levels. The report should display all information including updated 1, but i keep on getting the above error when i run report after updating records in database but when i remove filtering it works but sometimes it refuses. Can any1 help me with solution on how to handle this error. My report should filter some records form others. For example; it should display information of hired staff from list of registered staff. when i remove the filtering it displays all staff info including those who are not posted for job. Help me with how to handle null values in report.

Regards
Mex

1 Answer, 1 is accepted

Sort by
0
Mark Maggiore
Top achievements
Rank 1
answered on 01 Apr 2011, 11:07 PM
I had the same problem, and after searching the Telerik support forums, it seems that nobody really had an answer.  I really think it is a bug in the reporting tool.  DateOfTravel is my filter field which would never be null.  After several hours, I finally figured out how to get around this.  In my dataset, I modified my query in the 'where' clause like this:
AND DateOfTravel IS NOT NULL

Hopefully this will help you.
Tags
General Discussions
Asked by
Mex
Top achievements
Rank 1
Answers by
Mark Maggiore
Top achievements
Rank 1
Share this question
or