Query is good, but doesn't run in report.

  • I have a report with 11 parameters. When I execute the query and parameters it works fine in Management Studio and returns the results quickly.

    When I put the query into Report Builder and run the report the results return quickly everytime except when I change my one parameter to something other than the default. When I change the parameter to one of the other two options the report never finishs running. However, this does not happen in Management Studio. No matter what my parameter settings are in Management Studio the results return in less than a second. Why would one parameter not work properly in Reporting Services, but works properly in Managment Studio?

  • My first guess would be that you're not returning the proper parameter into the procedure. Try running Profiler and capture the actual query being passed, and see if it looks right.

    Wayne
    Microsoft Certified Master: SQL Server 2008
    Author - SQL Server T-SQL Recipes


    If you can't explain to another person how the code that you're copying from the internet works, then DON'T USE IT on a production system! After all, you will be the one supporting it!
    Links:
    For better assistance in answering your questions
    Performance Problems
    Common date/time routines
    Understanding and Using APPLY Part 1 & Part 2

  • I agree, this will work out the answer.

Viewing 3 posts - 1 through 2 (of 2 total)

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