• RexHelios (5/29/2013)


    I am passing these to a stored procedure call. If I set it at the SSRS parameter, it will either accept NULL or not. What I need is, for both from and to dates to be NULL, or both of them to be NOT NULL. I can't have the user enter value for one and not another. If I set the parameter to accept NULL, it won't enforce this cross check.

    - Rex

    *facepalm* Okay, now I see the problem. Somehow I didn't get that the first time around.

    It gets pretty gnarly. You need to add code to hidden parameters which feed off the visible ones which will do the validation.

    As an example, check out this:

    http://social.msdn.microsoft.com/Forums/en-US/sqlreportingservices/thread/3db067f2-628e-432d-aa25-f63b1ccb1dfa/

    Personally I just have the SProc dump an error message up and have it do parameter validations like this as a shortcircuit to the actual code.


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA