NULLABLE TYPE IN DATA METHOD

7 posts, 0 answers
  1. panchooo
    panchooo avatar
    13 posts
    Member since:
    Jun 2009

    Posted 21 Apr 2010 Link to this post

    hi guys,

    Im using a objectdatasource and after selecting my data method, and giving values to the data parameters im having problems,  an error apears while processing the report its because some of my parameters are nullable, but im not sure now what value i have to send
    i tried nothing null -1  and nothing seems to work, any guesses?
  2. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 27 Apr 2010 Link to this post

    Hi Francisco ,

    We are not sure that we understand your question correctly, so please send us a sample runnable project through the support system that illustrates the described behavior and we would advise you accordingly.

    Kind regards,
    Peter
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. panchooo
    panchooo avatar
    13 posts
    Member since:
    Jun 2009

    Posted 27 Apr 2010 Link to this post

    Thanks for answering peter, and sorry if i didnt explain my self

    i was using an object data source and when i defined the data method i used this method

          Public Shared Function SearchRejections(ByVal rejectionID As Nullable(Of Integer), ByVal defectID As Nullable(Of Integer), _
                ByVal comments As String, ByVal insertedbyID As Nullable(Of Integer), ByVal lot As String, _
                ByVal productID As Nullable(Of Integer), ByVal qaTechID As Nullable(Of Integer), ByVal quantity As Nullable(Of Integer), _
                ByVal rejectedOnStart As DateTime, ByVal rejectedOnEnd As DateTime, _
                ByVal detectedByOperator As Nullable(Of Boolean), _
                ByVal isVoided As Nullable(Of Boolean)) As List(Of Rejection)

    problema was the nullable data type no matter what i send as a parameter the report would produce an error while processing, what i did was a new method

         Public Function SearchRejections2(ByVal rejectionID As Integer, ByVal defectID As Integer, _
                ByVal comments As String, ByVal insertedbyID As Integer, ByVal lot As String, _
                ByVal productID As Integer, ByVal qaTechID As Integer, ByVal quantity As Integer, _
                ByVal rejectedOnStart As DateTime, ByVal rejectedOnEnd As DateTime, _
                ByVal detectedByOperator As Integer, _
                ByVal isVoided As Integer) As List(Of Rejection)

    and it worked great that way.

    thanks
  5. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 29 Apr 2010 Link to this post

    Hello Francisco ,

    We have found the root of the issue. The incorrect behavior will be fixed with top priority and the fix will be available in our next internal build.

    Your Telerik points have been updated for your bug report.

    Sincerely yours,
    Peter
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  6. Tomas
    Tomas avatar
    92 posts
    Member since:
    Jun 2010

    Posted 16 Nov 2011 Link to this post

    Hi Peter,

    I've got the same issue as well. I've got a ObjectDataSouce bound to a Select method which has a nullable datetime parameter.
    The parameter is mapped to a ReportParameter specified as DateTime with allow null set to true as well as allow blank.

    How can I map this to my Select method? Everything I've tried so far has failed.

    Tomas
  7. Peter
    Admin
    Peter avatar
    1611 posts

    Posted 18 Nov 2011 Link to this post

    Hello Tomas,

    We have made some tests locally with a nullable DateTime report parameter and nullable select method parameter. However we are unable to reproduce the unexpected behavior. Thus we will appreciate if you elaborate further and open support thread and send us a sample project that exhibits the issue to debug on our end.

    Best wishes,
    Peter
    the Telerik team

    Q2’11 SP1 of Telerik Reporting is available for download (see what's new). Get it today.

  8. Tomas
    Tomas avatar
    92 posts
    Member since:
    Jun 2010

    Posted 29 Nov 2011 Link to this post

    Hi,

    It looks like you have to use the Objectdatasource's configure wizard instead of editing the parameters through the edit parameters dialog to correctly map nullable types.

    Thanks Peter for the help.

    Tomas
Back to Top
DevCraft banner