all groups > sql server reporting services > september 2005 >
You're in the

sql server reporting services

group:

query at runtime


query at runtime RSUser
9/2/2005 10:59:02 AM
sql server reporting services:
Hi all,

Is there way in reporting service programming to give the sql select query
for a report during runtime.

Thanks
Re: query at runtime Bruce L-C [MVP]
9/2/2005 1:45:09 PM
You can have your query be an expression. Be in the generic query designer
(two panes). The button to switch to this is to the right of the ...

Put in an expression.

="select somefield, someotherfield from mytable where startdate>= '" &
parameters!ParamName & "' order by " & parameters!AnotherParam

Note that you have to put your own single quotes where appropriate. What I
do is first have a report with just a textbox with the expression so I can
see it and see if I have created the query appropriately. Then I assign it
to a dataset.


--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: query at runtime Robert Bruckner [MSFT]
9/3/2005 6:26:03 PM
Just adding to Bruce's description:
Once you are using an expression-based command-text, you can no longer
execute the query in the report designer data view. Also you can no longer
refresh the fields list. That's why it is important to first finish the
report design based on a constant command text and use Bruce's suggested
approach of a textbox to look at the expression results - before you change
the command text to be expression-based.

-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.


[quoted text, click to view]

Re: query at runtime RSUser
9/12/2005 7:34:02 AM
thanks!! I got it working. I have other issues. Please help me on these

1)Is there a way to supress the image when the report is
displayed in browser and then make them available for printing on paper
alone? is there a way to use any javascript or any other way to do this?

2)Say i have a dot net application which will display reports using
webservices and reports are using custom assembly which requires read
permission. Then while installing the dot net application in the
end users system, how the policy files will be configured. is there a way to
set up client's report server policy files through dot net code?

Thanks,
rsuser

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