Bug Report T293265
Visible to All Users

Parameter doesn't change its value after assigning an empty string

created 9 years ago

Hi,

Is there any way to make a parameter null when in the report designer as I have parameters that are optional in the stored procedure?
In crystal reports you can tick a null checkbox on the parameter when requesting data.

I am currently using the script below on a test report which allows me to retrieve the data with out errors from the datasource when I leave the optional parameter blank but if I try to put a value in to the text box and press submit it doesn't use it and when you click on the parameter panel again the value disappears.

I am using a custom parameter panel on a report viewer app I have created so I don't have these problems.

Thanks
Craig Smith

Visual Basic
Private Sub XtraReport_ParametersRequestSubmit(ByVal sender As Object, ByVal e As DevExpress.XtraReports.Parameters.ParametersRequestEventArgs) Dim Info As Object = e For Each Info In e.ParametersInformation If Info.Parameter.Type.FullName = "System.String" Then If Info.Parameter.Value = "" Then Info.Parameter.Value = DBNull.Value End If Next End Sub
Comments (1)
DevExpress Support Team 9 years ago

    Hello Craig,
    I reproduced this behavior and passed it to our developers for further research. We will let you know our results. Thank you for drawing our attention to this.

    Answers approved by DevExpress Support

    created 9 years ago

    We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

    Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

      Show previous comments (1)
      DevExpress Support Team 9 years ago

        Hello Craig,
        The trial period is provided for major versions, while the hotfix is an intermediate minor build for major v15.1. Feel free to download and install the hotfix provided here. When you run the installation, there will be the Update button, which means that you will update (not re-install) your major v15.1. Let me know if you have further questions.

        CS CS
        Craig Smith 11 9 years ago

          Hi Jannet,
          Just to let you know that the hotfix solved the problem.
          Thanks

          DevExpress Support Team 9 years ago

            Thank you for sharing your results, Craig.

            Do not hesitate to contact us in case you have further difficulties.

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.