Report Parameter has DefaultValue or ValidValue.....Forward Dependencies are not valid

  • Can anybody tell me what I'm doing wrong here:

    I get this error message in some form or another no matter what:

    The report parameter ‘Campaign’ has a DefaultValue or a ValidValue that depends on the report parameter "Campaign". Forward dependencies are not valid.

    I've studied 3 books, 3 online tutorials and can make the parameters work every time.  For my real life scenario, it just won't work.

    I have 2 datasets and am obviously trying to give the user the option to choose which campaign they want to view.

    #1:  dsTelco:

    SELECT  CallType, DisTime - AnswerTime AS ConnectTime

    FROM dbo.CTK 

     WHERE TCD IN('AM','HU','NM','VC','NT')

     OR AgentID LIKE '[a-z,0-9]%'

     ORDER BY CallDate

    #2:  dsCampaign

    SELECT P.CampaignID, P.CampDesc, C.Campaign

    From dbo.CPro P, dbo.CTK C

    WHERE (P.CampaignID = C.Campaign)

    AND (P.CampDesc = @Campaign)

    I set the the report parameters as follows:

    Paramater: Campaign

    datatype: Sting

    Available Values: Non-Queried

    Default Values: From Query >>Dataset: dsCampaign >> ValueField: Campaign

    I've spun my wheels for at least 10 hours and still can't get it to work out after many different iterations.  The only way I can get this parameter to work is if I place static campaign names in the Available values selection.  Can anybody offer some helpful guidance on this?  I'm about out of ideas!!

    Thanks,

    Clay

  • Thanks folks.........I figured it out...

     

    Clay

  • so what was it?

  • How did you get this to work. I having the same problem

  • Change the order of parameters so that your dependant parameter is below the parameter that feeds it.

  • I did. Here is the simple code i have

    select * from fleetsize where [plant code] in (@plantcode) and order_date between @startdate and @enddate

  • Please post your error.

  • I got it to work.

    I had to add @plantcode variable to the end of my first dataset

    select * from fleetsize where order_date between @startdate and @enddate and [plant code] in (@plantcode)

    and here is the dataset of the second one

    select distinct [plant code] from fleetsize where order_date between @startdate and @enddate

    and my @plantcode report properties are set up like this:

    Available values = from query

    dataset = Fleetsize2 (which is the 2nd data)

    Value field = plant_code (This is the filed the paramter chooses from)

    label field = plant_code (This is the filed the paramter chooses from)

    I left Default values = null

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

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