Forward dependencies are not valid

  • Hi,

    I have Test.rdll, with one parameter and one dataset

    Dataset:

    Name:Country

    Query:

    select distinct

    [Country]

    from [DW].[dbo].[Dim_Country]

    where Active = 1

    and Country = @Country

    Parameter:

    General; Name= Country, Prompt = Country, Data type = Text(Allow blank. Allow Null)

    Available Values;

    Get values from a query; Dataset = Country, Value Field = Country

    Default Value = Null

    when I try to execute this report, I get error with "Forward dependencies are not valid", I want to know how to solve this since I only have One parameter with One Dataset.

  • You're attempting to get the list of countries you can choose for your parameter from your dataset, which requires a Country to be selected.

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I just realized that, how do execute this allowing Country Parameter to be optional ? first I will remove

    and Country = @Country

    from my query, which will populate my Country Parameter with list of countries, but I want this parameter to be optional.

  • SELECT DISTINCT

    DC.Country

    FROM DW.dbo.Dim_Country DC

    WHERE DC.Active = 1

    AND DC.Country = ISNULL(@Country,DC.Country);

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Hi Thom, that seems to give me the same error message

  • Have you enabled the Country parameter to allow NULL values?

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Yes I have.

  • Ok, then make a second dataset that returns your Country list, and add NULL to the Returned list. Then use that list as your parameter values

    SELECT DISTINCT

    DC.Country

    FROM DW.dbo.Dim_Country DC

    WHERE DC.Active = 1

    UNION

    SELECT NULL;

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • hoseam (10/5/2016)


    Hi,

    I have Test.rdll, with one parameter and one dataset

    Dataset:

    Name:Country

    Query:

    select distinct

    [Country]

    from [DW].[dbo].[Dim_Country]

    where Active = 1

    and Country = @Country

    Parameter:

    General; Name= Country, Prompt = Country, Data type = Text(Allow blank. Allow Null)

    Available Values;

    Get values from a query; Dataset = Country, Value Field = Country

    Default Value = Null

    when I try to execute this report, I get error with "Forward dependencies are not valid", I want to know how to solve this since I only have One parameter with One Dataset.

    If your report has one dataset with one parameter then you should not be getting this message. Is there more that we are missing? Are you trying to cascade your parameters ? The order that you list the parameters matters

    https://msdn.microsoft.com/en-us/library/aa337169.aspx

    Did you create the parameter yourself or did SSRS automatically create it? Make sure the case is exact as SSRS is case sensitive. @myParam and @MyParam are two different parameters in SSRS.

    ----------------------------------------------------

Viewing 9 posts - 1 through 8 (of 8 total)

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