all groups > sql server reporting services > march 2006 >
You're in the

sql server reporting services

group:

Dynamic Queries Errors in Report Manager


Dynamic Queries Errors in Report Manager KurT
3/28/2006 12:36:01 PM
sql server reporting services: I am trying to replicate the use of Dynamic Queries in SQL Server 2000
Reporting Services documented in the "Hitchhiker's Guide to SS 2000 RS."

I have done everything the book has told me to do. I can build and run the
project in test mode, and deploy to my test server
(http:\\localhost\ReportServer) without error.

I have already set up the datasouce for the application in the Report Server
when I try to run the deployed project. Every time I run the project I get
the following:

1) An error has occurred during report processing. (rsProcessingAborted) Get
Online Help
2) Query execution failed for data set 'dsCustomers'.
(rsErrorExecutingCommand) Get Online Help
3) Line 1: Incorrect syntax near '='.

I think it's pointing at my Data set in my data tab, but am not sure why it
will point there when it worked in test mode!

Re: Dynamic Queries Errors in Report Manager kisa
3/29/2006 2:48:28 AM
Hello,
I am guessing that by dynamic queries you mean queries with parameters.
I am using them with a teradata db and to get the parameters to work in
the query I have to precede the query with =" and end it with ". To
insert the parameters you put "+Parameter!Name.Value+".
I hope this helps,
Lilja
Re: Dynamic Queries Errors in Report Manager KurT
3/29/2006 7:29:04 AM
Lilja, first I want to thank you for lending a hand. I appreciate it very
much.

Second, I want to restate you comments in my own words. For a dynamic query
with Parameters, I will start my statement with an equals sign (=).

To the left of the equal sign there will be nothing. To the right of the
equals I need to put the equation (which calls an assembly outside of my
project) in between double quotes: ="proj.class.method()".

Whenever I want to add a parameter to the equation I drop out of the string,
and add the literal with a + before and after the parameter:
="proj.class.method("+Parameter!Name.Value+")"

When I run the project in local debug mode, it works fine. When I change
the settings to Debug, give it a path "http://localhost/ReportServer" and
deploy it, I still get the same error. Is there something else that could be
the problem?

My equation runs over into a second line. Does it need the VB underscore to
carry the line over? ' _ '

Thank you very much again.

KurT

[quoted text, click to view]
AddThis Social Bookmark Button