all groups > sql server reporting services > november 2004 >
You're in the

sql server reporting services

group:

parameters really only a filter?


parameters really only a filter? greg_cochrane NO[at]SPAM hotmail.com
11/9/2004 1:50:07 PM
sql server reporting services:
Am I missing a trick here? When i set up my parameter in reporting
services and hit preview, the prompt apears and asks for the specified
column - however the sql generated is not refined any. it brings back
all the data and then filters on the selected column in the report.

By contrast in business objects if i used the @prompt function the sql
generated would be refined with the input of the end user ...eg
cost_centre_code = 1234 as opposed all cost centres. What reporting
services seems to be doing is bringing back all cost centres then
filtering on 1234.

If im right it has some pretty serious implications in terms of speed
of reporting -as my query is returning all data values rather than
one...

any ideas? any input? Isnt a parameter really just a filter rather
than a condition???


thanks for any ideas

Re: parameters really only a filter? Bruce L-C [MVP]
11/9/2004 5:12:22 PM
Greg, I answered this very completely at about 1:30 in your other posting.
Just to reiterate. Filters and query parameters are two different things and
both can use report parameters. You are using filters (which retrieve and
then filter) versus query parameters that are part of the where clause.

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: parameters really only a filter? Peter Blackburn (www.sqlreportingservices.net)
11/9/2004 11:04:41 PM
It depends on what you are doing. If you use the parameter in the WHERE
clause of your SQL then you would indeed be doing the 'filtering' on the
Database Server. If you are putting your parameter in a filter expression -
then yes this means that the filtering is done in the Report Server, and all
the data is requested from the Database Server.

You are right it is better to optimise queries to have the data pre-filtered
on the Database Server where advantage can be taken of Indexes.

We cover these issues in depth in Chapter 6 of our book - "Hitchhiker's
Guide to SQL Server 2000 Reporting Services"

Peter Blackburn
Hitchhiker's Guide to SQL Server 2000 Reporting Services
http://www.sqlreportingservices.net



[quoted text, click to view]

Re: parameters really only a filter? greg_cochrane NO[at]SPAM hotmail.com
11/10/2004 8:01:54 AM
Hi all -

Thanks for the info. I have now a parameter working on the database
server - specified in the where clause as you say - thats great.
However What I want is a prompt for the user - to enter in an
assignment id. When I pass the parameter to the where clause and hit
run in the Data tab I am asked for the Parameter value (on the Data
tab ) here I want a drop down list of values - which I would like
replicated when in the preview screen - so that the user can enter a
value from the drop down list of values box. At the moment I can only
enter in the preview panel what i have specified in the Data tab and
bring back the correct result. How can I get a drop down Lovs
todisplay when the parameter is in the where clause. I tried to point
both label and value to the specific data set but it would not allow -
saying:
"A label expression used for the report parameter ‘ApplicationID'
refers to a field. Fields cannot be used in report parameter
expressions."

Any ideas

help is very much appreciated

Greg






[quoted text, click to view]
Re: parameters really only a filter? Bruce L-C [MVP]
11/10/2004 11:30:19 AM
You are missing a concept here. You only use the data tab to test out your
query. To test your report you use the preview tab. That is where you have
control over the parameters. The parameters can be free form, based on a
list or based on a dataset. In the layout tab go to Report menu, report
parameters and you'll see where you do this. The report parameters have to
be mapped to the query parameters as well (they might be already). You can
check this by clicking on the ... in the data tab and going to the
parameters tab.

--
Bruce Loehle-Conger
MVP SQL Server Reporting Services

[quoted text, click to view]

Re: parameters really only a filter? mlapoint
11/10/2004 2:48:01 PM
If you want the drop-down you need to do the following:

1) Create a second Dataset that returns the list of Valid Assignment ID's
and a second column for the labels you want in the drop-down
2) On the main menu, click on Report -> Report Parameters
3) Click on the Assignment ID parameter
4) In the Available Values area, click on From Query
5) Choose the new Assignment ID DataSet, Value Field, and Label Field

Now try the Preview tab.

Hope this helps

[quoted text, click to view]
How to create a new dataset within an exsisting report greg_cochrane NO[at]SPAM hotmail.com
11/11/2004 2:57:28 AM
Hi there - sorry Im really new to reporting services and this is going
to sound like a simple question! but how do I create a new data set
within a current report?? I am trying to build a list of values for a
column in my first report - see below.

Many thanks - help is appreciated.

Greg




[quoted text, click to view]
Re: How to create a List of Values for a Query and report parameter? greg_cochrane NO[at]SPAM hotmail.com
11/11/2004 7:30:04 AM
Q Do i "add a new item" and write the sql free hand in there? or do I
create a new report? if so how do I link the result set achieved
through to the parameter on my first report?


Greg


[quoted text, click to view]
Re: How to create a List of Values for a Query and report paramete johnE
11/11/2004 11:43:01 AM
go to the data tab and click on the drop down nesxt to your dataset name.
one of the options will be <new dataset> you will need to code the SQL but
for a parameter list it should be straightforward.

[quoted text, click to view]
Re: How to create a List of Values for a Query and report paramete greg_cochrane NO[at]SPAM hotmail.com
11/12/2004 5:13:32 AM
Hi John - thanks very much!! got it working now!

Greg




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