Saturday, February 25, 2012

Multiple Select Parameters

Hello,
Am I correct when I conclude that in order to support multiple
selections at runtime for parameters I would need to create a custom
interface?
I do not want to reinvent the wheel if I don't have to.
Thank you in advance,
JerryThe simple way to do this is to have a text parameter and teach your users
to type in a comma delimited list. The problem is that they might not do it
correctly, and you can't prompt them with list of valid values..
Otherwise, you would have to do something special as you suggest...This is a
very common issue, and I hope one that is addressed in the next version...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Jerry Nixon" <jerrynixon@.gmail.com> wrote in message
news:36f558cf.0410111519.8fd28a4@.posting.google.com...
> Hello,
> Am I correct when I conclude that in order to support multiple
> selections at runtime for parameters I would need to create a custom
> interface?
> I do not want to reinvent the wheel if I don't have to.
> Thank you in advance,
> Jerry|||Hi
I have successfully setup 3 parameters that are entered at runtime.
To do this I setup each parameter as a dataset then tied them together via
the report parameters.
For each report parameter the values come from the query of the dataset for
that parameter.
Works a treat.
Fiona
"Jerry Nixon" wrote:
> Hello,
> Am I correct when I conclude that in order to support multiple
> selections at runtime for parameters I would need to create a custom
> interface?
> I do not want to reinvent the wheel if I don't have to.
> Thank you in advance,
> Jerry
>|||Hi
I have successfully use 3 parameters on a report via the following method.
1.
Setup a dataset for each report parameter. You need a table that has only
those values that are valid for that field (unique) ie like a dimension table.
2.
Then in â'report parametersâ' for each parameter say that its values are
obtained from the query of the dataset for that parameter.
Works well
Fiona
"Jerry Nixon" wrote:
> Hello,
> Am I correct when I conclude that in order to support multiple
> selections at runtime for parameters I would need to create a custom
> interface?
> I do not want to reinvent the wheel if I don't have to.
> Thank you in advance,
> Jerry
>|||It never occurred to me to have 3 parameters off of the same dataset...
Good job!
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Wayne Snyder" <wayne.nospam.snyder@.mariner-usa.com> wrote in message
news:eW7vUsFsEHA.2952@.TK2MSFTNGP10.phx.gbl...
> The simple way to do this is to have a text parameter and teach your users
> to type in a comma delimited list. The problem is that they might not do
it
> correctly, and you can't prompt them with list of valid values..
> Otherwise, you would have to do something special as you suggest...This is
a
> very common issue, and I hope one that is addressed in the next version...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Jerry Nixon" <jerrynixon@.gmail.com> wrote in message
> news:36f558cf.0410111519.8fd28a4@.posting.google.com...
> > Hello,
> >
> > Am I correct when I conclude that in order to support multiple
> > selections at runtime for parameters I would need to create a custom
> > interface?
> >
> > I do not want to reinvent the wheel if I don't have to.
> >
> > Thank you in advance,
> >
> > Jerry
>|||@.Wayne Snyder: Are you thinking we are using reporting services at home with
our childrens?
Teaching the user to enter manuel criteria is not qualified as a bad
workaround in 99% of real companies!
I guess such answers are only qualified to collect MVP points.
"Wayne Snyder" wrote:
> The simple way to do this is to have a text parameter and teach your users
> to type in a comma delimited list. The problem is that they might not do it
> correctly, and you can't prompt them with list of valid values..
> Otherwise, you would have to do something special as you suggest...This is a
> very common issue, and I hope one that is addressed in the next version...
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
> "Jerry Nixon" <jerrynixon@.gmail.com> wrote in message
> news:36f558cf.0410111519.8fd28a4@.posting.google.com...
> > Hello,
> >
> > Am I correct when I conclude that in order to support multiple
> > selections at runtime for parameters I would need to create a custom
> > interface?
> >
> > I do not want to reinvent the wheel if I don't have to.
> >
> > Thank you in advance,
> >
> > Jerry
>
>|||What about a list of 5000+ choices where the user has the liberty to
choose n items in the list. Items in the list are pharmaceutical names
that are quite long and prone to miss spelloing.
Wayne Snyder wrote:
> It never occurred to me to have 3 parameters off of the same
dataset...
> Good job!
> --
> Wayne Snyder, MCDBA, SQL Server MVP
> Mariner, Charlotte, NC
> www.mariner-usa.com
> (Please respond only to the newsgroups.)
> I support the Professional Association of SQL Server (PASS) and it's
> community of SQL Server professionals.
> www.sqlpass.org
>|||Jerry,
I believe this will be available in SQL2005 RS, due sometime this year!
Chris
Jerry Nixon wrote:
> Hello,
> Am I correct when I conclude that in order to support multiple
> selections at runtime for parameters I would need to create a custom
> interface?
> I do not want to reinvent the wheel if I don't have to.
> Thank you in advance,
> Jerry|||We are arranging something that may be relevant, to support batch
printing of various items that may be created throughout the day (or
over several days, possibly).
We plan to have a Batch table and a BatchItem table - the first time a
user designates a form for printing it creates a Batch record and a
BatchItem record. Additional forms designated for the batch add
BatchItem records, with a Batch ID as a foreign key.
When the report is printed, the Batch ID is passed as a parameter and
the BatchItem records are used to build the Where clause in the stored
procedure that provides data for the report.
Obviously, the management of all this must be handled on the
application end - but it will support any number of choices, with only
one parameter value needing to be passed to the report.
Your Batch table should identify the report type, and whether and when
the batch was printed - the BatchItem child table can have fields of
different data types to collect parameter values of those data types -
you just need to reference the correct field in the stored procedure.
Our concern is somewhat with performance - this approach calls for a
subselect in the stored procedure, and where we want to use other
parameter sets for the same report, the use of dynamic SQL in the
stored procedure so we can make use of either the Batch ID (if it is
provided) or an alternate set of parameters.

No comments:

Post a Comment