NULL parameters for report in data driven subscriptions

  • Hi!

    I am working with SSRS 2005 and I have a report that has 2 parameters: location - which gets values from a table, and servers - which get a list from another table, and includes servers where the location is the value previously selected for the first parameter.

    If Location is NULL then all servers are returned.

    If server is NULL then all servers for the selected locations are selected.

    Interactively and with standard subscription it works fine, with NULL or non-NULL values.

    Now, I want to create a data driven subscription which should send an email with all locations and all servers to some email address and all server from a certain location to another address. So I should have:

    Address1: Location=NULL, Server=NULL

    Address2: Location='SomeValidLocation', Server=NULL

    However, when I try to create teh data-driven subscription with these NULL values I get message:

    Default value or value provided for the report parameter 'p_Location' is not a valid value.

    How can I provide a NULL value for the parameter through the subscribers table?

    Any help will be gratly appreciated.

  • did you selected "Allow Null Value" option for your report parameters?

  • Yes, the parameters accept NULL value and the report works fine. The only thing I need is how should I say NULL in the subscription TABLE.

  • can't you put this selection logic in Stored procedure and just pass the report parameter to the stored procedure?

  • Did anyone find the solution for this?

  • There are a couple of different ways to handle this but the quick and dirty way is to have a special token, 'ALL', and disallow nulls.

    You can do this with your existing code to fill the dropdown lists for the param (assuming it is data-driven, or "from Query") with a union.

    >L<

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply