• ramana3327 (11/20/2014)


    Hi,

    We have a report with parameter username. When we pass username it will update his email.

    We have to enter the parameter. We didn't specify the the values or default values for that parameter. User has enter manually.

    But when they enter the username that is not existing in the database it is showing empty. It is showing values when they enter the username that exists in the database.

    I need to display some message in that report, when they enter any user name that is not in the database instead of showing empty I need to display "User name is not valid username"

    How to do that?

    Assuming you have a dataset called dsUsers along the lines of:

    SELECT Id, UserName

    FROM dbo.Users

    WHERE UserName = @UserParam

    Then put an expression in a textbox and do something like:

    =IIF(First(Fields!UserName.Value, "dsUsers") IS Nothing, "User name is not valid username", Fields!UserName.Value & " is valid.")

    HTH,

    Rob