Showing posts with label selected. Show all posts
Showing posts with label selected. Show all posts

Monday, February 13, 2012

**Create Login **

Hi
I want to create a new login "L1" in SQL 2000 and let him to be as L1's
owner and can backup and restore it too,I selected the "public" and
"db_owner" in Enterprise manager as I defined the login name ,but what
should I choose to let him to do "backup & restore db" too?
Any help wolud be thankful.Nothing. Members of the db_owner database role can backup and restore
databases of which they are the owner. If you want to give a login
permissions to backup and restore a database of which they are not the
owner, you can make them a member of the db_backupoperator database role.
Jacco Schalkwijk
SQL Server MVP
"maryam rezvani" <rezvani@.parskhazar.net> wrote in message
news:usUBP3DNFHA.3336@.TK2MSFTNGP10.phx.gbl...
> Hi
> I want to create a new login "L1" in SQL 2000 and let him to be as L1's
> owner and can backup and restore it too,I selected the "public" and
> "db_owner" in Enterprise manager as I defined the login name ,but what
> should I choose to let him to do "backup & restore db" too?
> Any help wolud be thankful.
>
>|||I created L1 with db_owner of DB1 ,but when I changed my enterprise manger
by logining through L1 and wanted to restore DB1's backup as DB2 following
error appearred:
"Create databae permission denied in databade master, restore database is
terminated abnormally."
so,I think it's not enough just to check "public" and "db_owner" for L1 in
DB1,why?
can anybody help me?
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:OZ9GDHENFHA.2384@.tk2msftngp13.phx.gbl...
> Nothing. Members of the db_owner database role can backup and restore
> databases of which they are the owner. If you want to give a login
> permissions to backup and restore a database of which they are not the
> owner, you can make them a member of the db_backupoperator database role.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "maryam rezvani" <rezvani@.parskhazar.net> wrote in message
> news:usUBP3DNFHA.3336@.TK2MSFTNGP10.phx.gbl...
>|||If a login is a member of the db_owner role, it has the permissions to
backup and restore that database. What you want to do is create a new
database, and restore the original database over that. For that the login
needs to be a member of the dbcreator fixed server role or you have to grant
the permission with GRANT CREATE DATABASE TO L1. The latter gives less
permissions, as the login won't be allowed to drop or alter other databases
than the one he has created. Creating a database automatically as the
creating login to the db_owner role.
Jacco Schalkwijk
SQL Server MVP
"maryam rezvani" <rezvani@.parskhazar.net> wrote in message
news:OF0Ik2ENFHA.2704@.TK2MSFTNGP15.phx.gbl...
>I created L1 with db_owner of DB1 ,but when I changed my enterprise manger
> by logining through L1 and wanted to restore DB1's backup as DB2 following
> error appearred:
> "Create databae permission denied in databade master, restore database is
> terminated abnormally."
> so,I think it's not enough just to check "public" and "db_owner" for L1 in
> DB1,why?
> can anybody help me?
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote
> in message news:OZ9GDHENFHA.2384@.tk2msftngp13.phx.gbl...
>|||Thanks I tried as you said and I've got following error at the end of
progression of a blue bar(showing restore action)
"Server user L1 is not a valid user in database DB2 ,restore database is
terminated abnormally."
as a result the database restored but L1 has no access to DB2!!!!
what should I do?
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:#QvAMBFNFHA.2704@.TK2MSFTNGP15.phx.gbl...
> If a login is a member of the db_owner role, it has the permissions to
> backup and restore that database. What you want to do is create a new
> database, and restore the original database over that. For that the login
> needs to be a member of the dbcreator fixed server role or you have to
grant
> the permission with GRANT CREATE DATABASE TO L1. The latter gives less
> permissions, as the login won't be allowed to drop or alter other
databases
> than the one he has created. Creating a database automatically as the
> creating login to the db_owner role.
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "maryam rezvani" <rezvani@.parskhazar.net> wrote in message
> news:OF0Ik2ENFHA.2704@.TK2MSFTNGP15.phx.gbl...
manger
following
is
in
role.
what
>|||Can you give the _exact_ steps you take (which permissions you have assigned
to L1, which database you restore to where, etc), and the _exact_ error
message you get? (There is no such thing as a "server user" in Microsoft SQL
Server)
Jacco Schalkwijk
SQL Server MVP
"maryam rezvani" <rezvani@.parskhazar.net> wrote in message
news:e8ags$ONFHA.3560@.TK2MSFTNGP14.phx.gbl...
> Thanks I tried as you said and I've got following error at the end of
> progression of a blue bar(showing restore action)
> "Server user L1 is not a valid user in database DB2 ,restore database is
> terminated abnormally."
> as a result the database restored but L1 has no access to DB2!!!!
> what should I do?
> "Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid>
> wrote
> in message news:#QvAMBFNFHA.2704@.TK2MSFTNGP15.phx.gbl...
> grant
> databases
> manger
> following
> is
> in
> role.
> what
>|||Thanks
"Jacco Schalkwijk" <jacco.please.reply@.to.newsgroups.mvps.org.invalid> wrote
in message news:euWLXiPNFHA.2736@.TK2MSFTNGP09.phx.gbl...
> Can you give the _exact_ steps you take (which permissions you have
assigned
> to L1, which database you restore to where, etc), and the _exact_ error
> message you get? (There is no such thing as a "server user" in Microsoft
SQL
> Server)
> --
> Jacco Schalkwijk
> SQL Server MVP
>
> "maryam rezvani" <rezvani@.parskhazar.net> wrote in message
> news:e8ags$ONFHA.3560@.TK2MSFTNGP14.phx.gbl...
login
database
L1
<jacco.please.reply@.to.newsgroups.mvps.org.invalid>
restore
the
as
and
>

Saturday, February 11, 2012

(urgent) How can I solve this error

Hi i am trying to implement Multivalue parameter in my report....

So for the Parameter PlanId i have selected multivalue parameter... and the avialable values are from a query...

when i run the report and just check 1 Plan it works fine.. but when i go to check more than one plan.. I get this error

An error has occured duing local report processing.

an error has occured during report processing.

Query exceution failed for data set Statement.

Error converting data type nvarchar to int.

any help will be appreciated.

Regards

Karen

How are you using the parameter in the SQL?

Can you post an example?

BobP

|||

BobP,

thanks for ur answer.. I have a dataset called statements which is a sproc and is as follows

Code Snippet

ALTER PROCEDURE [dbo].[rpt_Statements]

@.PeriodId int,

@.ClientId int,

@.PlanId int = NULL,

@.StartPart int = NULL,

@.StopPart int = NULL

AS

IF @.StartPart IS NULL

SELECT @.StartPart = MIN(ParticipantId)

FROM Participant

IF @.StopPart IS NULL

SELECT @.StopPart = MAX(ParticipantId)

FROM Participant

SELECT DISTINCT

s.PlanId,

PeriodId,

s.ParticipantId,

p.AddrZip, -- Added by Karen

dbo.udf_BeginDate(@.PeriodId) BeginDate,

dbo.udf_EndDate(@.PeriodId) EndDate

FROM

vwParticipantSourceSummary s

JOIN ClientPlan c

ON s.PlanId = c.PlanId

Join Participant p

ON s.ParticipantId = p.ParticipantId

WHERE

ClientId = @.ClientId

AND

PeriodId = @.PeriodId

AND

(

s.PlanId = @.PlanId

OR

(

s.PlanId = s.PlanId

AND

@.PlanId IS NULL

)

)

AND

(

BeginningBalance <> 0

OR

Contributions <> 0

OR

EndingBalance <> 0

)

AND

s.ParticipantId BETWEEN @.StartPart AND @.StopPart

ORDER BY

s.PlanId,

p.AddrZip DESC--ParticipantId

in the report parameter for the parameter @.PlanId i am giving a queried value and selecting a particular dataset.. which is as follows

Code Snippet

ALTER PROCEDURE [dbo].[usp_GetPlansByClient]

@.ClientId int = NULL

AS

--Temp Debug Code

/*declare @.ClientId int

set @.ClientId = 1

*/

SELECT

NULL PlanId,

'< All Plans >' PlanName

UNION

SELECT

PlanId,

PlanName

FROM

ClientPlan

WHERE

ClientId = @.ClientId

OR

(

ClientId = ClientId

AND

@.ClientId IS NULL

)

so when i run the sproc get plans i will get

1

2

3

etc....

but when i try to put it as a multivalue parameter its gonna 1,2,3

i think there is some conversion problem

any help will be appreciated.

Regards

Karen

|||

Ok, on multivalue parameters, you shuold use an IN clause in the sql...

So...

Where PlanID in (@.PlanID)

That is what is causing your error, i beleive.

HtH

BobP

|||i changed my sproc to as follows

* rpt_Statements

*

* Main stored procedure for Statement reports.

*

* HISTORY

* 3/2006 - Stephen Garrett

* Created.

* 1/28/2007 - Stephen Garrett

* Updated to allow reports to be run for all plans for a client in a given period.

**************************************************************************************************/

Code Snippet

ALTER PROCEDURE [dbo].[rpt_Statements]

@.PeriodId int,

@.ClientId int,

@.PlanId int = NULL,

@.StartPart int = NULL,

@.StopPart int = NULL

AS

IF @.StartPart IS NULL

SELECT @.StartPart = MIN(ParticipantId)

FROM Participant

IF @.StopPart IS NULL

SELECT @.StopPart = MAX(ParticipantId)

FROM Participant

SELECT DISTINCT

s.PlanId,

PeriodId,

s.ParticipantId,

p.AddrZip,

dbo.udf_BeginDate(@.PeriodId) BeginDate,

dbo.udf_EndDate(@.PeriodId) EndDate

FROM

vwParticipantSourceSummary s

JOIN ClientPlan c

ON s.PlanId = c.PlanId

Join Participant p

ON s.ParticipantId = p.ParticipantId

WHERE

ClientId = @.ClientId

AND

PeriodId = @.PeriodId

AND

s.PlanId In (@.PlanId)

--(

-- s.PlanId = @.PlanId

-- OR

-- (

-- s.PlanId = s.PlanId

-- AND

-- @.PlanId IS NULL

-- )

-- )

AND

(

BeginningBalance <> 0

OR

Contributions <> 0

OR

EndingBalance <> 0

)

AND

s.ParticipantId BETWEEN @.StartPart AND @.StopPart

ORDER BY

s.PlanId,

p.AddrZip Desc--ParticipantId

and in my sql query window , i gave this

rpt_statements 6,1,'374,375'

and got this error

Msg 8114, Level 16, State 5, Procedure rpt_Statements, Line 0

Error converting data type varchar to int.

Hope u can help me out here.

Regards

Karen

|||

Since you are using a proc, you will have to pass in the parameter as a string and build your sql as a string and then execute it.

Whenever I use Multi-Valued parameters, I use embedded SQL, not a stored proc, just so I can use the IN clause. It seems to be faster executing than passing the list of values to a proc.

BobP

|||

can u pls give me a example as to how u do it..

Regards

Karen

|||

Sure. What I do is not use a stored proc, and just put the SQL in the report dataset.

However, you can also pass the parameter string to the proc and build the SQL that way. It makes it harder to test/debug, but it is doable.

here is an example:

Code Snippet

ALTER PROCEDURE [dbo].[rpt_Statements]

@.PeriodId int,

@.ClientId int,

@.PlanId nvarchar(max) = NULL,

@.StartPart int = NULL,

@.StopPart int = NULL

AS

IF @.StartPart IS NULL

SELECT @.StartPart = MIN(ParticipantId)

FROM Participant

IF @.StopPart IS NULL

SELECT @.StopPart = MAX(ParticipantId)

FROM Participant

Declare @.SQLText nvarchar(max)

if @.PlanID is null

Begin

SELECT DISTINCT

s.PlanId,

PeriodId,

s.ParticipantId,

p.AddrZip, -- Added by Karen

dbo.udf_BeginDate(@.PeriodId) BeginDate,

dbo.udf_EndDate(@.PeriodId) EndDate

FROM

vwParticipantSourceSummary s

JOIN ClientPlan c

ON s.PlanId = c.PlanId

Join Participant p

ON s.ParticipantId = p.ParticipantId

WHERE

ClientId = @.ClientId

AND PeriodId = @.PeriodId

AND (

BeginningBalance <> 0

OR

Contributions <> 0

OR

EndingBalance <> 0

)

AND s.ParticipantId BETWEEN @.StartPart AND @.StopPart

ORDER BY

s.PlanId,

p.AddrZip DESC--ParticipantId

End

Else

Begin

Select @.SQLText = 'SELECT DISTINCT

s.PlanId,

PeriodId,

s.ParticipantId,

p.AddrZip, -- Added by Karen

dbo.udf_BeginDate(@.PeriodId) BeginDate,

dbo.udf_EndDate(@.PeriodId) EndDate

FROM

vwParticipantSourceSummary s

JOIN ClientPlan c

ON s.PlanId = c.PlanId

Join Participant p

ON s.ParticipantId = p.ParticipantId

WHERE

ClientId = @.ClientId

AND PeriodId = @.PeriodId

AND s.PlanID in (' + @.PlanID + ')

AND (

BeginningBalance <> 0

OR

Contributions <> 0

OR

EndingBalance <> 0

)

AND s.ParticipantId BETWEEN @.StartPart AND @.StopPart

ORDER BY

s.PlanId,

p.AddrZip DESC--ParticipantId'

execute (@.SQLText)

End

I didn't test that, but it should work fine. (No tables, etc)

BobP

|||

Bob

thanks for ur answer... but when i run the sproc i am getting this error

Msg 137, Level 15, State 2, Line 6

Must declare the scalar variable "@.PeriodId".

|||

Ahhhh.. sorry about that... here is the corrected code:

Code Snippet

ALTER PROCEDURE [dbo].[rpt_Statements]

@.PeriodId int,

@.ClientId int,

@.PlanId nvarchar(max) = NULL,

@.StartPart int = NULL,

@.StopPart int = NULL

AS

IF @.StartPart IS NULL

SELECT @.StartPart = MIN(ParticipantId)

FROM Participant

IF @.StopPart IS NULL

SELECT @.StopPart = MAX(ParticipantId)

FROM Participant

Declare @.SQLText nvarchar(max)

if @.PlanID is null

Begin

SELECT DISTINCT

s.PlanId,

PeriodId,

s.ParticipantId,

p.AddrZip, -- Added by Karen

dbo.udf_BeginDate(@.PeriodId) BeginDate,

dbo.udf_EndDate(@.PeriodId) EndDate

FROM

vwParticipantSourceSummary s

JOIN ClientPlan c

ON s.PlanId = c.PlanId

Join Participant p

ON s.ParticipantId = p.ParticipantId

WHERE

ClientId = @.ClientId

AND PeriodId = @.PeriodId

AND (

BeginningBalance <> 0

OR

Contributions <> 0

OR

EndingBalance <> 0

)

AND s.ParticipantId BETWEEN @.StartPart AND @.StopPart

ORDER BY

s.PlanId,

p.AddrZip DESC--ParticipantId

End

Else

Begin

Select @.SQLText = 'SELECT DISTINCT

s.PlanId,

PeriodId,

s.ParticipantId,

p.AddrZip, -- Added by Karen

dbo.udf_BeginDate(' + convert(varchar,@.PeriodId) + ') BeginDate,

dbo.udf_EndDate' + convert(varchar,@.PeriodId) + ') EndDate

FROM

vwParticipantSourceSummary s

JOIN ClientPlan c

ON s.PlanId = c.PlanId

Join Participant p

ON s.ParticipantId = p.ParticipantId

WHERE

ClientId = ' + convert(varchar,@.ClientId) + '

AND PeriodId = ' + convert(varchar,@.PeriodId) + '

AND s.PlanID in (' + @.PlanID + ')

AND (

BeginningBalance <> 0

OR

Contributions <> 0

OR

EndingBalance <> 0

)

AND s.ParticipantId BETWEEN ' + Convert(varchar, @.StartPart) + ' AND ' + Convert(varchar, @.StopPart) + '

ORDER BY

s.PlanId,

p.AddrZip DESC--ParticipantId'

execute (@.SQLText)

End

Try that... again, i cant really test with out the tables, but that should give you a really good starting point.

BobP

|||

Thanks a lot bob, with works great..

I have a another quick question... is it possible to give a case statement in the order by... Like for examples.. suppose the user will be wanting to send some plans to the client and some plans to the participant.. and if the plans that are selected are to be sent to the client i want them to sort by planId and Addr zip else i want them to sort by.. Addrzip only...

Regards.

Karen

|||

It sure is. The only issue that I have found with that is the ASC/DESC flag sometimes will not work with a case...

Order by Case When @.SortBy = 'name'

Then Name

else

City

end

BobP

|||

is this right

ORDER BY

Case when psi.MailMethodId = 1

Then

p.AddrZip Desc

Else

s.PlanId,

p.AddrZip desc

End '

cause when i run the sproc i am getting a error that says incorrect syntax near the keyword desc

|||The asc/desc has to go outside of the case statement.

ORDER BY

Case when psi.MailMethodId = 1

Then

p.AddrZip

Else

s.PlanId,

p.AddrZip

End desc '

BobP

|||

BobP - BIM wrote:

The asc/desc has to go outside of the case statement.

ORDER BY

Case when psi.MailMethodId = 1

Then

p.AddrZip

Else

s.PlanId,

p.AddrZip

End desc '

BobP

Looks likes its not accepting

the Else part... cause i am getting an error saying Incorrect syntax near ','

Regards

Kareb

Thursday, February 9, 2012

(Select All) value

I would like to display "ALL" in a text box if the (Select All) option is
selected as a parameter.
I can display 1, 2, 5 to every single selected value in the textbox using
the JOIN function. But if the (Select All) parameter is selected, I would
rather display "All" in my textbox instead of 50+ parameters.
I have tried something of the following
=IIf(Parameters!param.Value = "Select All" , "All",
Join(Parameters!param.Value, " | "))
But this does not work.
Any suggestions out there?
Thanks
RobRob,
I have an idea, but I don't know how good it is...
If there is a way to count the number of values selected, you could
compare that with a count of the records in the dataset. However, since
I don't know if that is possible, here is an idea...
You are using a dataset to generate the "Available Values" for one
parameter. Use this same dataset as the default value for a new,
internal parameter. This parameter will not be used for anything other
than holding all of the values that could be selected.
Then, use an expression to compare the 2 JOIN results.
Iif(JOIN(Parameters!mainParm.Value,",") =JOIN(Parameters!internalParm.Value,","), "All",
JOIN(Parameters!mainParm.Value,",") )
Hope this helps!
-Josh
Rob wrote:
> I would like to display "ALL" in a text box if the (Select All) option is
> selected as a parameter.
> I can display 1, 2, 5 to every single selected value in the textbox using
> the JOIN function. But if the (Select All) parameter is selected, I would
> rather display "All" in my textbox instead of 50+ parameters.
> I have tried something of the following
> =IIf(Parameters!param.Value = "Select All" , "All",
> Join(Parameters!param.Value, " | "))
> But this does not work.
> Any suggestions out there?
> Thanks
> Rob|||Ok, I figured it out and I wanted to put my solution here for others in the
same boat.
Problem: In SSRS 2005 (non SP1) there is the Multi-value option for a
parameter. If you want to display the parameter list in a text box, you use
something like:
=Join(Parameters!param_mso.Label, ", ") //this goes in textbox
and (m.mso_num IN (@.param_mso)) //this goes in the query
This will display every select parameter in a textbox. But what happens if
you have 100+ parameters? Then you have an unmanageable list of parameters
being displayed on the report.
So, if the user selects (Select All) from the dropdown list, only display
"All" in the textbox.
Solution: You need to create a new dataset that only returns the row count
of the parameter list. So, for example: this is the SQL query that returns a
list of MSO objects that are associated with a NETWORK parameter
SELECT s.network_id, ms.mso_num, m.mso_name
FROM service s, mso_service ms, mso m
WHERE s.service_id = ms.service_id
and ms.mso_num = m.mso_num
and s.network_id = @.param_network
GROUP BY s.network_id, ms.mso_num, m.mso_name
ORDER BY ms.mso_num
I create a new DATASET just to get the count of the above query:
SELECT count(*)
FROM(
SELECT s.network_id, ms.mso_num, m.mso_name
FROM service s, mso_service ms, mso m
WHERE s.service_id = ms.service_id
and ms.mso_num = m.mso_num
and s.network_id = :param_network
GROUP BY s.network_id, ms.mso_num, m.mso_name
ORDER BY ms.mso_num)x
This way I know the max number of row items that the original query is going
to return. I then use the following formula in my textbox:
=IIf(Parameters!param_mso.Count = Parameters!param_count.Value, "ALL",
Join(Parameters!param_mso.Label, ", "))
So if the count of my MSO parameter equals the total count of the query,
then display "ALL", otherwise display all of the parameters selected.
I hope that this helps out.
Rob
"Josh" wrote:
> Rob,
> I have an idea, but I don't know how good it is...
> If there is a way to count the number of values selected, you could
> compare that with a count of the records in the dataset. However, since
> I don't know if that is possible, here is an idea...
> You are using a dataset to generate the "Available Values" for one
> parameter. Use this same dataset as the default value for a new,
> internal parameter. This parameter will not be used for anything other
> than holding all of the values that could be selected.
> Then, use an expression to compare the 2 JOIN results.
> Iif(JOIN(Parameters!mainParm.Value,",") => JOIN(Parameters!internalParm.Value,","), "All",
> JOIN(Parameters!mainParm.Value,",") )
> Hope this helps!
> -Josh
>
> Rob wrote:
> > I would like to display "ALL" in a text box if the (Select All) option is
> > selected as a parameter.
> >
> > I can display 1, 2, 5 to every single selected value in the textbox using
> > the JOIN function. But if the (Select All) parameter is selected, I would
> > rather display "All" in my textbox instead of 50+ parameters.
> >
> > I have tried something of the following
> >
> > =IIf(Parameters!param.Value = "Select All" , "All",
> > Join(Parameters!param.Value, " | "))
> >
> > But this does not work.
> >
> > Any suggestions out there?
> >
> > Thanks
> > Rob
>|||You can just use Count(Fieldname, "Dataset") to retrieve the number instead
of creating a seperate dataset.
"Rob" wrote:
> Ok, I figured it out and I wanted to put my solution here for others in the
> same boat.
> Problem: In SSRS 2005 (non SP1) there is the Multi-value option for a
> parameter. If you want to display the parameter list in a text box, you use
> something like:
> =Join(Parameters!param_mso.Label, ", ") //this goes in textbox
> and (m.mso_num IN (@.param_mso)) //this goes in the query
> This will display every select parameter in a textbox. But what happens if
> you have 100+ parameters? Then you have an unmanageable list of parameters
> being displayed on the report.
> So, if the user selects (Select All) from the dropdown list, only display
> "All" in the textbox.
> Solution: You need to create a new dataset that only returns the row count
> of the parameter list. So, for example: this is the SQL query that returns a
> list of MSO objects that are associated with a NETWORK parameter
> SELECT s.network_id, ms.mso_num, m.mso_name
> FROM service s, mso_service ms, mso m
> WHERE s.service_id = ms.service_id
> and ms.mso_num = m.mso_num
> and s.network_id = @.param_network
> GROUP BY s.network_id, ms.mso_num, m.mso_name
> ORDER BY ms.mso_num
> I create a new DATASET just to get the count of the above query:
> SELECT count(*)
> FROM(
> SELECT s.network_id, ms.mso_num, m.mso_name
> FROM service s, mso_service ms, mso m
> WHERE s.service_id = ms.service_id
> and ms.mso_num = m.mso_num
> and s.network_id = :param_network
> GROUP BY s.network_id, ms.mso_num, m.mso_name
> ORDER BY ms.mso_num)x
> This way I know the max number of row items that the original query is going
> to return. I then use the following formula in my textbox:
> =IIf(Parameters!param_mso.Count = Parameters!param_count.Value, "ALL",
> Join(Parameters!param_mso.Label, ", "))
> So if the count of my MSO parameter equals the total count of the query,
> then display "ALL", otherwise display all of the parameters selected.
> I hope that this helps out.
> Rob
>
>
> "Josh" wrote:
> >
> > Rob,
> >
> > I have an idea, but I don't know how good it is...
> >
> > If there is a way to count the number of values selected, you could
> > compare that with a count of the records in the dataset. However, since
> > I don't know if that is possible, here is an idea...
> >
> > You are using a dataset to generate the "Available Values" for one
> > parameter. Use this same dataset as the default value for a new,
> > internal parameter. This parameter will not be used for anything other
> > than holding all of the values that could be selected.
> >
> > Then, use an expression to compare the 2 JOIN results.
> > Iif(JOIN(Parameters!mainParm.Value,",") => > JOIN(Parameters!internalParm.Value,","), "All",
> > JOIN(Parameters!mainParm.Value,",") )
> >
> > Hope this helps!
> >
> > -Josh
> >
> >
> > Rob wrote:
> > > I would like to display "ALL" in a text box if the (Select All) option is
> > > selected as a parameter.
> > >
> > > I can display 1, 2, 5 to every single selected value in the textbox using
> > > the JOIN function. But if the (Select All) parameter is selected, I would
> > > rather display "All" in my textbox instead of 50+ parameters.
> > >
> > > I have tried something of the following
> > >
> > > =IIf(Parameters!param.Value = "Select All" , "All",
> > > Join(Parameters!param.Value, " | "))
> > >
> > > But this does not work.
> > >
> > > Any suggestions out there?
> > >
> > > Thanks
> > > Rob
> >
> >|||Won't let me edit my post. Something like this.
=IIF(Count(Fields!AcctCode.Value, "AcctCode") =Parameters!AcctCode.Count,"All",Join(Parameters!AcctCode.Label,","))
"Rob" wrote:
> I would like to display "ALL" in a text box if the (Select All) option is
> selected as a parameter.
> I can display 1, 2, 5 to every single selected value in the textbox using
> the JOIN function. But if the (Select All) parameter is selected, I would
> rather display "All" in my textbox instead of 50+ parameters.
> I have tried something of the following
> =IIf(Parameters!param.Value = "Select All" , "All",
> Join(Parameters!param.Value, " | "))
> But this does not work.
> Any suggestions out there?
> Thanks
> Rob