Problem in query or parameters

  • I posted something similar to this a while back but never got any response and am no closer to a result alone and am *desperate*!!!  I figured I would try posting again with a bit more detail.

    I am using the following query for my dataset:

    SELECT DISTINCT

      vwProtocol.ProtocolNumber,

      vwProtocol.HSCNumber,

      PIName =

       (SELECT MemberName

       FROM vwMemberNames

       WHERE vwMemberNames.MemberID = tb_Protocol.PIMemberID),

      TotalAccrual =

       (SELECT Count(PatientID)

       FROM tb_PatientEnrollment

       WHERE tb_PatientEnrollment.ProtocolID = tb_Protocol.ProtocolID),

      tb_Protocol.ProtocolID,

      Reg =

       (SELECT MemberName

       FROM vwMemberNames

       WHERE vwMemberNames.MemberID = tb_Protocol.RegulatoryMemberID),

      RegPhone =

       (SELECT CASE Len(Telephone)

        WHEN 7 THEN stuff(Telephone, 4, 0, '-')

        WHEN 10 THEN stuff(substring(Telephone, 4, 7), 4, 0, '-')

        ELSE Telephone

        END

       FROM tb_Membership

       WHERE tb_Membership.MemberID =

        tb_Protocol.RegulatoryMemberID),

      tb_Protocol.Title,

      IRBExpiration = vwProtocol.HSCExpiration,

      vwProtocol.Status

     FROM

      tb_Protocol

     RIGHT JOIN vwProtocol ON vwProtocol.ProtocolID = tb_Protocol.ProtocolID

     WHERE

      vwProtocol.HSCExpiration between @begindate

        and @enddate

      AND

      ISNULL(tb_Protocol.RegulatoryMemberID,'') = @reg

    I am using another dataset to populate the @reg parameter.  When I run this in preview it works fine.  When I deploy it, no matter what I do I get an error:

    This report requires a default or user-defined value for the report parameter 'reg'. To run or subscribe to this report, you must provide a parameter value. (rsReportParameterValueNotSet) Get Online Help

    I have not a clue what to do next or what could possibly be going wrong.  I have another report on that same server that works just fine with a drop down so I don't think it is the setup of my report server.

    Any ideas, place to look, *anything* would be most appreciated!!!

    Thanks,

    Eva

  • Hi Eva,

     

    Have you tried deleting the report and then re-deploying it.

     

    Robbie

     

  • What's your error?

  • I have tried redeploying.  I have tried deleting the entire project and starting again from scratch a couple of times.  I figured maybe I overlooked something in the first build or something.  So far, every time I recreate it, it does the exact same thing.

    For the person with the error question.  I can see how you missed it in all that text!

    Here it is again:

    This report requires a default or user-defined value for the report parameter 'reg'. To run or subscribe to this report, you must provide a parameter value. (rsReportParameterValueNotSet) Get Online Help

    Thanks!!!

    Eva

  • I'm no Reporting Services expert as I have just started in the last couple months getting my first production server up and running.  But I have had a similar kind of issue (maybe) when trying to populate defaults for a drop down list based on a query that used user!userid as part of the query.  I had to make the query dynamic sql in order for it to get the value then execute the query.

    But, from the error message it sounds more like it's having a hard time making the connection from the query paramter to the report parameter.  Try setting a hardcoded default for the report parameter and see what it does. 

    My help may not be much, but I know how frustrating these reporting services errors can be.

  • just a thought but have you checked that the shared data source for the parameter dataset has also been deployed to your live server?


    Kindest Regards,

    Martin

  • I know that this may be a bit obvious, ubt have you checked that the parameter you are setting in the Report Parameters window is the same name as the one in your SQL?

  • To solve this problem, simply rename the parameter name (in Report Parameters Property) to something else. for example, originally it was called "reg", rename it to "registry" and redeploy it. The error will disappear.

  • I have the same problem as Eva when try to pass the parameters from my aspx page to the report. I got the same error

    This report requires a default or user-defined value for the report parameter 'SpOrg'. To run or subscribe to this report, you must provide a parameter value. (rsReportParameterValueNotSet) Get Online Help

    Currenlty Microsoft has no article about this problem.There gotta be the way to solve this problem. Where are all the experts?

    Missqti

  • Missqti, you and me both feel the same way.

    Though, look how much longer later and I just abandonded any hopes of using that product for now.

  • Eva,

    What version of VS are you using? I heard VS 2005 is much easier and more powerful to create the reports.

  • Sounds to me like one of your params is trying to pass in a NULL value which is being bounced by the report... try allowing NULL values on your report params, if the report runs without error then you know that one of your params is returning a NULL.

    OR you could try supplying a default and see if things work OK, this would prove same as above.


    Kindest Regards,

    Martin

Viewing 12 posts - 1 through 11 (of 11 total)

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