In our legacy reports (ASP.NET/Crystal Reports) we use the logged in user account to filter the report.
Basically you are restricted to seeing your 'own' data when running the report based upon your user ID.
I am looking for suggestions as how to restrict report results based on something like domain user ID in Reporting Services.
There are many cases (like in the sales profession) where users of the same report do not want other users to access their information.
Thanks for any suggestions.use the global variable User!UserID
be aware that you may not create subscriptions for a report that contains user-defined parameter values.
Showing posts with label parameter. Show all posts
Showing posts with label parameter. Show all posts
Sunday, March 25, 2012
Accessing Dataset values
I have 2 datasets. One is used to give the values to a parameter and the
second one is used to populated the main table in my report.
The first one has a code and a Name like:
Code Name
c cat
d dog
I would like to display â'catâ' in the main table, but I just have the code
â'câ'. Is there a way to do it ?Soan,
I'm not sure I fully understand your scenario.
If you're after the 'label' from the chosen parameter, you can get it
using;
=Parameters!paramname.Label
Chris
Soan wrote:
> I have 2 datasets. One is used to give the values to a parameter and
> the second one is used to populated the main table in my report.
> The first one has a code and a Name like:
> Code Name
> c cat
> d dog
> I would like to display â'catâ' in the main table, but I just have
> the code â'câ'. Is there a way to do it ?|||I am looking for a function that returns the second value of the dataset when
i give the first one.
Something like Parameters!paramname.Label the difference is that the
parameter does not have the valued assigned (I want to access different
values in the dataset).
> I'm not sure I fully understand your scenario.
> If you're after the 'label' from the chosen parameter, you can get it
> using;
> =Parameters!paramname.Label
> Chris
>
> Soan wrote:
> > I have 2 datasets. One is used to give the values to a parameter and
> > the second one is used to populated the main table in my report.
> >
> > The first one has a code and a Name like:
> > Code Name
> > c cat
> > d dog
> >
> > I would like to display â'catâ' in the main table, but I just have
> > the code â'câ'. Is there a way to do it ?
>|||Soan, I think you just need a join in the second dataset on the table
from the 1st dataset that gives you the description. You should make
the dataset contain all the data you want to show in the data region.
eg dataset 1 gives salesperson list;
Select SalesId, FirstName from tblSalesperson
this is used in the parameter. The value is SalesId, the label is
FirstName.
the second dataset would return the orders for that salesperson, but
you want the sales persons fullname on it from the salespersons table;
Select O.OrderId, O.SalesId, S.FullName, O.Date, O.Value
From tblOrder O
Join tblSalesperson S On O.SalesId = S.SalesId
Where O.SalesId = @.parametername
You can achieve this in the Graphical query designer, but I always use
the Generic designer so can't really explain it that well.
Hope that helps.
Chris
Soan wrote:
> I am looking for a function that returns the second value of the
> dataset when i give the first one.
> Something like Parameters!paramname.Label the difference is that the
> parameter does not have the valued assigned (I want to access
> different values in the dataset).
>
> > I'm not sure I fully understand your scenario.
> > If you're after the 'label' from the chosen parameter, you can get
> > it using;
> > =Parameters!paramname.Label
> >
> > Chris
> >
> >
> > Soan wrote:
> >
> > > I have 2 datasets. One is used to give the values to a parameter
> > > and the second one is used to populated the main table in my
> > > report.
> > >
> > > The first one has a code and a Name like:
> > > Code Name
> > > c cat
> > > d dog
> > >
> > > I would like to display â'catâ' in the main table, but I just
> > > have the code â'câ'. Is there a way to do it ?
> >
> >
second one is used to populated the main table in my report.
The first one has a code and a Name like:
Code Name
c cat
d dog
I would like to display â'catâ' in the main table, but I just have the code
â'câ'. Is there a way to do it ?Soan,
I'm not sure I fully understand your scenario.
If you're after the 'label' from the chosen parameter, you can get it
using;
=Parameters!paramname.Label
Chris
Soan wrote:
> I have 2 datasets. One is used to give the values to a parameter and
> the second one is used to populated the main table in my report.
> The first one has a code and a Name like:
> Code Name
> c cat
> d dog
> I would like to display â'catâ' in the main table, but I just have
> the code â'câ'. Is there a way to do it ?|||I am looking for a function that returns the second value of the dataset when
i give the first one.
Something like Parameters!paramname.Label the difference is that the
parameter does not have the valued assigned (I want to access different
values in the dataset).
> I'm not sure I fully understand your scenario.
> If you're after the 'label' from the chosen parameter, you can get it
> using;
> =Parameters!paramname.Label
> Chris
>
> Soan wrote:
> > I have 2 datasets. One is used to give the values to a parameter and
> > the second one is used to populated the main table in my report.
> >
> > The first one has a code and a Name like:
> > Code Name
> > c cat
> > d dog
> >
> > I would like to display â'catâ' in the main table, but I just have
> > the code â'câ'. Is there a way to do it ?
>|||Soan, I think you just need a join in the second dataset on the table
from the 1st dataset that gives you the description. You should make
the dataset contain all the data you want to show in the data region.
eg dataset 1 gives salesperson list;
Select SalesId, FirstName from tblSalesperson
this is used in the parameter. The value is SalesId, the label is
FirstName.
the second dataset would return the orders for that salesperson, but
you want the sales persons fullname on it from the salespersons table;
Select O.OrderId, O.SalesId, S.FullName, O.Date, O.Value
From tblOrder O
Join tblSalesperson S On O.SalesId = S.SalesId
Where O.SalesId = @.parametername
You can achieve this in the Graphical query designer, but I always use
the Generic designer so can't really explain it that well.
Hope that helps.
Chris
Soan wrote:
> I am looking for a function that returns the second value of the
> dataset when i give the first one.
> Something like Parameters!paramname.Label the difference is that the
> parameter does not have the valued assigned (I want to access
> different values in the dataset).
>
> > I'm not sure I fully understand your scenario.
> > If you're after the 'label' from the chosen parameter, you can get
> > it using;
> > =Parameters!paramname.Label
> >
> > Chris
> >
> >
> > Soan wrote:
> >
> > > I have 2 datasets. One is used to give the values to a parameter
> > > and the second one is used to populated the main table in my
> > > report.
> > >
> > > The first one has a code and a Name like:
> > > Code Name
> > > c cat
> > > d dog
> > >
> > > I would like to display â'catâ' in the main table, but I just
> > > have the code â'câ'. Is there a way to do it ?
> >
> >
Sunday, March 11, 2012
access url problem parameter
I pass one parameter to my report .
it is ReportDate which is string .
http://webtest/reportserver?/VendorStat/HCV2005&rs:Command=Render&rc:Parameters=False&ReportDate=3/31/2005
I get this error message.
Default value or value provided for the report parameter 'ReportDate' is not a valid value. (rsInvalidReportParameter) Get Online HelpI think there is sth wrong with ReportDate=3/31/2005
it should be "/" I tried "%2f", it is still wrong.
The error isn't complaining about the format of the date you specified, but rather the date itself. Your report is specifying a list of valid values for a ReportDate. In the RDL, you have provided either a static list, or a query that returns the set of possible values for a parameter. "3/31/2005" is not in that list.Tuesday, March 6, 2012
Access Text of Parameter
I have a report that uses parameters from a query. The query returns two
columns. One for the paramerter value and one for the parameter title. I want
the header of the report to access the same fild that I have set as the Label
Field in my report parameter dropdown.
I can add the actual parameter to the header using:
=Parameters!Property.Value
But I don't want the actual parameter, i want the alias from the second
colum of the parameter query.
I tried
=Parameters!Property.Text
but it didn't work.
Any ideas?
Thanks!try =Parameters!Property.Label
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Eric Langland [MSFT]" <EricLanglandMSFT@.discussions.microsoft.com> wrote in
message news:C60A3AB7-7C07-418B-B2F7-ECA395614511@.microsoft.com...
>I have a report that uses parameters from a query. The query returns two
> columns. One for the paramerter value and one for the parameter title. I
> want
> the header of the report to access the same fild that I have set as the
> Label
> Field in my report parameter dropdown.
> I can add the actual parameter to the header using:
> =Parameters!Property.Value
> But I don't want the actual parameter, i want the alias from the second
> colum of the parameter query.
> I tried
> =Parameters!Property.Text
> but it didn't work.
> Any ideas?
> Thanks!|||That did it.
Many thanks Lev!
"Lev Semenets [MSFT]" wrote:
> try =Parameters!Property.Label
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Eric Langland [MSFT]" <EricLanglandMSFT@.discussions.microsoft.com> wrote in
> message news:C60A3AB7-7C07-418B-B2F7-ECA395614511@.microsoft.com...
> >I have a report that uses parameters from a query. The query returns two
> > columns. One for the paramerter value and one for the parameter title. I
> > want
> > the header of the report to access the same fild that I have set as the
> > Label
> > Field in my report parameter dropdown.
> >
> > I can add the actual parameter to the header using:
> >
> > =Parameters!Property.Value
> >
> > But I don't want the actual parameter, i want the alias from the second
> > colum of the parameter query.
> >
> > I tried
> > =Parameters!Property.Text
> > but it didn't work.
> >
> > Any ideas?
> >
> > Thanks!
>
>
columns. One for the paramerter value and one for the parameter title. I want
the header of the report to access the same fild that I have set as the Label
Field in my report parameter dropdown.
I can add the actual parameter to the header using:
=Parameters!Property.Value
But I don't want the actual parameter, i want the alias from the second
colum of the parameter query.
I tried
=Parameters!Property.Text
but it didn't work.
Any ideas?
Thanks!try =Parameters!Property.Label
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"Eric Langland [MSFT]" <EricLanglandMSFT@.discussions.microsoft.com> wrote in
message news:C60A3AB7-7C07-418B-B2F7-ECA395614511@.microsoft.com...
>I have a report that uses parameters from a query. The query returns two
> columns. One for the paramerter value and one for the parameter title. I
> want
> the header of the report to access the same fild that I have set as the
> Label
> Field in my report parameter dropdown.
> I can add the actual parameter to the header using:
> =Parameters!Property.Value
> But I don't want the actual parameter, i want the alias from the second
> colum of the parameter query.
> I tried
> =Parameters!Property.Text
> but it didn't work.
> Any ideas?
> Thanks!|||That did it.
Many thanks Lev!
"Lev Semenets [MSFT]" wrote:
> try =Parameters!Property.Label
> --
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Eric Langland [MSFT]" <EricLanglandMSFT@.discussions.microsoft.com> wrote in
> message news:C60A3AB7-7C07-418B-B2F7-ECA395614511@.microsoft.com...
> >I have a report that uses parameters from a query. The query returns two
> > columns. One for the paramerter value and one for the parameter title. I
> > want
> > the header of the report to access the same fild that I have set as the
> > Label
> > Field in my report parameter dropdown.
> >
> > I can add the actual parameter to the header using:
> >
> > =Parameters!Property.Value
> >
> > But I don't want the actual parameter, i want the alias from the second
> > colum of the parameter query.
> >
> > I tried
> > =Parameters!Property.Text
> > but it didn't work.
> >
> > Any ideas?
> >
> > Thanks!
>
>
Sunday, February 19, 2012
ACCESS PARAMETER (ssrs) urgent
HI ,
how can i access the different dataset parameter in th SSRS. i have created one dataset and define Bu as a parameter. then i created separate dataset called dataset2 and need to access that BU parameter from dataset2. i cant access it using normal way. ex strtoset(@.Bu)..... ?
SET [FilteredBUList] AS strtoset(@.BU,"Dataset2")
how can i access the different dataset parameter in th SSRS. i have created one dataset and define Bu as a parameter. then i created separate dataset called dataset2 and need to access that BU parameter from dataset2. i cant access it using normal way. ex strtoset(@.Bu)..... ?
dear Friend,
Inside my report, I have a field that is the sum of one field in a dataset and other field in other dataset...:
Code Snippet
=Sum(Fields!NC_FPA_OpFinanc.Value, "DataSet_FPAtribuidos")+Sum(Fields!CM_ENT_ReqFundosPropriosRC.Value, "DataSet_ActivoPonderado")
Helped you?
Regards!
SET [FilteredBUList] AS strtoset(@.BU,"Dataset2")
Subscribe to:
Posts (Atom)