Home Forums SQL Server 2005 Business Intelligence Parameter being disabled even though it's not a cascading parameter RE: Parameter being disabled even though it's not a cascading parameter

  • Ah good I was going to suggest attaching it as a text file. Just have to make sure not to break any rules or protocols on the forum.

    I've just used this as a query in the sproc for dsP1 and the query in dsP2

    Select Null CompanyNumber, '' CompanyDescription

    union all

    SELECT 1 CompanyNumber, 'comp1' CompanyDescription

    union all

    SELECT 2 CompanyNumber, 'comp2' CompanyDescription

    union all

    SELECT 3 CompanyNumber, 'comp3' CompanyDescription

    union all

    SELECT 4 CompanyNumber, 'comp4' CompanyDescription

    As long as P1 appears after P3 it gets disabled, but there's no obvious reason why.

    You're right. It's wacky land.

    What I can see without shuffling anything is that yes, P1 is initially greyed out. If I type something random into p3 nothing happens, until I press enter. Then P1 is available. That still doesn't explain why the stored proc doesn't immediately supply the available values to P1 as a drop down box. Weirdly if the order is P3, P2, P1 then it doesn't happen.

    Clearly there's a difference between the stored proc and the direct query. There's some interaction between the freetext parm and the stored proc parm that is not happening with the freetext parm and the direct query parm.

    BUT

    I have another trick for you. Add a default value for p3. Delete the (null) that it wants to put in there. Effectively you are setting the default for P3 to be an empty string. This then tricks the report into thinking it has a value and can proceed with running the stored proc and populating the available values for the next parm, P1.

    To the end user, however, it looks like the parameter is waiting for entry. The only caveat here is to make sure that all the parms don't have defaults otherwise the report will go ahead and run itself, unless that's what you want. I often do want that. I try and make reports that run without any parameter entry by using current time period defaults, and using the UserID to look up the users Office location and showing them a report relevant to them. The users can then change params to look at historical (hysterical) data if they choose but 90% of the time they want to look at what's current.