Showing posts with label facing. Show all posts
Showing posts with label facing. Show all posts

Monday, March 12, 2012

Parameters that depend on another

I have a situation where I need to create the same graph for 4 "levels". The problem I am facing is that each subsequent level depends on its parent, and I require a parameter (@.Level) to indicate which level of the report to create.

For example, if a user wants to view a report for the 'grouping' level then they would select the grouping from a drop down list and @.level would be set to 1.

Now, if the user wanted to view a report for the 'subgrouping' level, then the user would first need to select a grouping. Once this is done, the subgrouping drop down would become enabled and the user would then select a subgrouping to the grouping (ie. filtering based on the first dropdown menu).

If the user does not select a subgrouping, then the value of @.level should be 1. If the user does select a subgrouping, then the value of @.level should be 2.

The datasource for this report is a stored proced that accepts the @.level paramter as well as the ID of the object choosen from the drop down menu.

Is this possible to do? If so, how would i go about creating the sequence which the parameteres are entered and determin which level is selected?

Thanks for any and all help.

Ben

Ok, I figured out that when one parameter excepts another parameters value as its input, it is disabled untill the required parameters are selected.

I still need help figuring out how to know/set the value of @.level based on which parameters have been chosen.

Thanks.

Ben

Friday, March 9, 2012

Parameters in Reporting Services

Hi,
I am facing problem in reporting services using parameter field.I am
passing values to parameter field empids like '10,12'.I want the data of
employee 10 and 12.while creating the parameter how can i mention.In t-sql
empid IN @.eID is it correct,how can i mention in parameter field.
Thanks in advance
Malli.There are several ways you may do this...If your user can make a properly
formatted comma delimited list your SQL might look like this
="Select * from employee where employeeid in (" +
Parameters!EmployeeID.Value + "))"
you could also make a table valued function which parses the parameter and
returns a table which contains one row for each employee id. YOu then join
that to the employees table
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
"Malli" <Malli@.discussions.microsoft.com> wrote in message
news:E7538F08-2BA3-4590-8FE6-B84C3EB96BC3@.microsoft.com...
> Hi,
> I am facing problem in reporting services using parameter field.I am
> passing values to parameter field empids like '10,12'.I want the data of
> employee 10 and 12.while creating the parameter how can i mention.In t-sql
> empid IN @.eID is it correct,how can i mention in parameter field.
>
> Thanks in advance
> Malli.|||Hi Wayne,
i might have a similar issue and what you propose is not working for me. I
don't know if it was the same issue for Malli but at least it is the same
topic.
I open a report in Design mode and i am on the Data pane.
I want to have a recordset with one field being a parameter where the user
can enter comma separated values (i will inform the user in the parameter
prompt).
Now, i can make the test of the query in the Data pane.
- when i'm typing IN (@.Status) and in the pop-up the value 1 then it works
fine
- when i'm typing IN (@.Status) and in the pop-up the value 1,5 then it
doesn't work
- when i'm typing IN (1;5), it is transformed to IN (N'1','5') and it works
(thank you Microsoft for that new syntax !)
- when i'm typing IN (@.Status) and in the pop-up the value 1;5 then it
doesn't work
So, how to write the query for the report in the Data pane ?
What should the user enter as value in its text box ?
Thanks a lot to solve this mysterious behaviour.....Dominique
************************************************************
"Wayne Snyder" wrote:
> There are several ways you may do this...If your user can make a properly
> formatted comma delimited list your SQL might look like this
> ="Select * from employee where employeeid in (" +
> Parameters!EmployeeID.Value + "))"
> you could also make a table valued function which parses the parameter and
> returns a table which contains one row for each employee id. YOu then join
> that to the employees table
>
> --
> 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
> "Malli" <Malli@.discussions.microsoft.com> wrote in message
> news:E7538F08-2BA3-4590-8FE6-B84C3EB96BC3@.microsoft.com...
> > Hi,
> > I am facing problem in reporting services using parameter field.I am
> > passing values to parameter field empids like '10,12'.I want the data of
> > employee 10 and 12.while creating the parameter how can i mention.In t-sql
> > empid IN @.eID is it correct,how can i mention in parameter field.
> >
> >
> > Thanks in advance
> >
> > Malli.
>
>