Showing posts with label value. Show all posts
Showing posts with label value. Show all posts

Friday, March 23, 2012

RS2005+ADAM+User!Userid

Hi,
I'm trying to obtain the value of some attributes of the current user,
this is made using an OLEDB connection to an ADAM server. Then I use a
query like this:
Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
ESP,DC=ibsesp,DC=loc' where userPrincipalName='jordi.ramis@.domain.loc'
and objectclass='user'
There is not problem with this, RS succesfully gets the corrent
information wich can be saved in a report parameter to filter my main
query.
The problem is that 'jordi.ramis@.domain.loc' must be obiously be
replaced with the current user, I've tried to simply use a report
parameter that is assigned to User!Userid, that's the error:
"The data extension OLE DB does not support named parameters, use
unnammed parameters instead"
I've tried to use something like an ? for a variable but I'm unable to
getting it to work. Can someone explain how to use report variables on
OLEDB to query an ADAM directory? Is the dynamic sql the solution? How
can I do this?
Thanks to all!It was my understanding that User!UserID returns the format: DOMAIN\User
when you want the user@.domain format - I don't see how this would even
work - have you tried to see if it returns you a record if you change your
select to this:
Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
ESP,DC=ibsesp,DC=loc' where userPrincipalName='domain.loc\jordi.ramis'
and objectclass='user'
'
=-Chris
<jordi_ramis@.hotmail.com> wrote in message
news:1164128212.934067.138640@.h54g2000cwb.googlegroups.com...
> Hi,
> I'm trying to obtain the value of some attributes of the current user,
> this is made using an OLEDB connection to an ADAM server. Then I use a
> query like this:
> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> ESP,DC=ibsesp,DC=loc' where userPrincipalName='jordi.ramis@.domain.loc'
> and objectclass='user'
> There is not problem with this, RS succesfully gets the corrent
> information wich can be saved in a report parameter to filter my main
> query.
> The problem is that 'jordi.ramis@.domain.loc' must be obiously be
> replaced with the current user, I've tried to simply use a report
> parameter that is assigned to User!Userid, that's the error:
> "The data extension OLE DB does not support named parameters, use
> unnammed parameters instead"
> I've tried to use something like an ? for a variable but I'm unable to
> getting it to work. Can someone explain how to use report variables on
> OLEDB to query an ADAM directory? Is the dynamic sql the solution? How
> can I do this?
> Thanks to all!
>|||This is about the silly Pre-Windows 2000 name, a.k.a. sAMAccountName in
Active Directory.
User!UserID gives you domain\username
Your query wants to have the userPrincipalName, which looks like
username@.domain
sAMAccountName looks like domain\username
You could try to change your where clause to look for the sAMAccountName,
which looks like domainUsername. Try something like this
Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
ESP,DC=ibsesp,DC=loc'
where sAMAccountName='domain\jorramis'
and objectclass='user'
Scropp down to the tech section at this page to see a list of AD attributes:
http://www.minasi.com/newsletters/nws0503.htm
Kaisa M. Lindahl Lervik
"Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
news:%23%23IKvdaDHHA.1196@.TK2MSFTNGP02.phx.gbl...
> It was my understanding that User!UserID returns the format: DOMAIN\User
> when you want the user@.domain format - I don't see how this would even
> work - have you tried to see if it returns you a record if you change your
> select to this:
> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> ESP,DC=ibsesp,DC=loc' where userPrincipalName='domain.loc\jordi.ramis'
> and objectclass='user'
> '
> =-Chris
> <jordi_ramis@.hotmail.com> wrote in message
> news:1164128212.934067.138640@.h54g2000cwb.googlegroups.com...
>> Hi,
>> I'm trying to obtain the value of some attributes of the current user,
>> this is made using an OLEDB connection to an ADAM server. Then I use a
>> query like this:
>> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
>> ESP,DC=ibsesp,DC=loc' where userPrincipalName='jordi.ramis@.domain.loc'
>> and objectclass='user'
>> There is not problem with this, RS succesfully gets the corrent
>> information wich can be saved in a report parameter to filter my main
>> query.
>> The problem is that 'jordi.ramis@.domain.loc' must be obiously be
>> replaced with the current user, I've tried to simply use a report
>> parameter that is assigned to User!Userid, that's the error:
>> "The data extension OLE DB does not support named parameters, use
>> unnammed parameters instead"
>> I've tried to use something like an ? for a variable but I'm unable to
>> getting it to work. Can someone explain how to use report variables on
>> OLEDB to query an ADAM directory? Is the dynamic sql the solution? How
>> can I do this?
>> Thanks to all!
>|||Hi,
Thanks for all the replies, they will be sure useful but the real
problem is that I'm unable to put any parameter to the report. I can't
make:
Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
ESP,DC=ibsesp,DC=loc'
where sAMAccountName=@.my_parameter
and objectclass='user'
due to restrictions in OLEDB extension. Has anyone been able to
acomplish this?. Thanks a lot.
Kaisa M. Lindahl Lervik ha escrito:
> This is about the silly Pre-Windows 2000 name, a.k.a. sAMAccountName in
> Active Directory.
> User!UserID gives you domain\username
> Your query wants to have the userPrincipalName, which looks like
> username@.domain
> sAMAccountName looks like domain\username
> You could try to change your where clause to look for the sAMAccountName,
> which looks like domainUsername. Try something like this
> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> ESP,DC=ibsesp,DC=loc'
> where sAMAccountName='domain\jorramis'
> and objectclass='user'
>
> Scropp down to the tech section at this page to see a list of AD attributes:
> http://www.minasi.com/newsletters/nws0503.htm
>
> Kaisa M. Lindahl Lervik
> "Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
> news:%23%23IKvdaDHHA.1196@.TK2MSFTNGP02.phx.gbl...
> > It was my understanding that User!UserID returns the format: DOMAIN\User
> > when you want the user@.domain format - I don't see how this would even
> > work - have you tried to see if it returns you a record if you change your
> > select to this:
> >
> > Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> > ESP,DC=ibsesp,DC=loc' where userPrincipalName='domain.loc\jordi.ramis'
> > and objectclass='user'
> >
> > '
> >
> > =-Chris
> >
> > <jordi_ramis@.hotmail.com> wrote in message
> > news:1164128212.934067.138640@.h54g2000cwb.googlegroups.com...
> >>
> >> Hi,
> >>
> >> I'm trying to obtain the value of some attributes of the current user,
> >> this is made using an OLEDB connection to an ADAM server. Then I use a
> >> query like this:
> >>
> >> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> >> ESP,DC=ibsesp,DC=loc' where userPrincipalName='jordi.ramis@.domain.loc'
> >> and objectclass='user'
> >>
> >> There is not problem with this, RS succesfully gets the corrent
> >> information wich can be saved in a report parameter to filter my main
> >> query.
> >>
> >> The problem is that 'jordi.ramis@.domain.loc' must be obiously be
> >> replaced with the current user, I've tried to simply use a report
> >> parameter that is assigned to User!Userid, that's the error:
> >>
> >> "The data extension OLE DB does not support named parameters, use
> >> unnammed parameters instead"
> >>
> >> I've tried to use something like an ? for a variable but I'm unable to
> >> getting it to work. Can someone explain how to use report variables on
> >> OLEDB to query an ADAM directory? Is the dynamic sql the solution? How
> >> can I do this?
> >>
> >> Thanks to all!
> >>
> >
> >|||Hi,
I finally found the solution so I'm answering myself.
You have to write the query dinamically:
="Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER
from 'LDAP://myserver/OU=Users ESP,DC=ibsesp,DC=loc'
where sAMAccountName='"+User!UserId+"' and objectclass='user'"
I never though that I could write the query dynamically in RS2005,
that's fantastic and solves many of my problems.
Thanks to all.
jordi_ramis@.hotmail.com ha escrito:
> Hi,
> Thanks for all the replies, they will be sure useful but the real
> problem is that I'm unable to put any parameter to the report. I can't
> make:
>
> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> ESP,DC=ibsesp,DC=loc'
> where sAMAccountName=@.my_parameter
> and objectclass='user'
> due to restrictions in OLEDB extension. Has anyone been able to
> acomplish this?. Thanks a lot.
> Kaisa M. Lindahl Lervik ha escrito:
> > This is about the silly Pre-Windows 2000 name, a.k.a. sAMAccountName in
> > Active Directory.
> >
> > User!UserID gives you domain\username
> > Your query wants to have the userPrincipalName, which looks like
> > username@.domain
> > sAMAccountName looks like domain\username
> >
> > You could try to change your where clause to look for the sAMAccountName,
> > which looks like domainUsername. Try something like this
> > Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> > ESP,DC=ibsesp,DC=loc'
> >
> > where sAMAccountName='domain\jorramis'
> > and objectclass='user'
> >
> >
> > Scropp down to the tech section at this page to see a list of AD attributes:
> > http://www.minasi.com/newsletters/nws0503.htm
> >
> >
> > Kaisa M. Lindahl Lervik
> >
> > "Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
> > news:%23%23IKvdaDHHA.1196@.TK2MSFTNGP02.phx.gbl...
> > > It was my understanding that User!UserID returns the format: DOMAIN\User
> > > when you want the user@.domain format - I don't see how this would even
> > > work - have you tried to see if it returns you a record if you change your
> > > select to this:
> > >
> > > Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> > > ESP,DC=ibsesp,DC=loc' where userPrincipalName='domain.loc\jordi.ramis'
> > > and objectclass='user'
> > >
> > > '
> > >
> > > =-Chris
> > >
> > > <jordi_ramis@.hotmail.com> wrote in message
> > > news:1164128212.934067.138640@.h54g2000cwb.googlegroups.com...
> > >>
> > >> Hi,
> > >>
> > >> I'm trying to obtain the value of some attributes of the current user,
> > >> this is made using an OLEDB connection to an ADAM server. Then I use a
> > >> query like this:
> > >>
> > >> Select RS-SGRE-OFFICE,RS-SGRE-CUSTOMER from 'LDAP://myserver/OU=Users
> > >> ESP,DC=ibsesp,DC=loc' where userPrincipalName='jordi.ramis@.domain.loc'
> > >> and objectclass='user'
> > >>
> > >> There is not problem with this, RS succesfully gets the corrent
> > >> information wich can be saved in a report parameter to filter my main
> > >> query.
> > >>
> > >> The problem is that 'jordi.ramis@.domain.loc' must be obiously be
> > >> replaced with the current user, I've tried to simply use a report
> > >> parameter that is assigned to User!Userid, that's the error:
> > >>
> > >> "The data extension OLE DB does not support named parameters, use
> > >> unnammed parameters instead"
> > >>
> > >> I've tried to use something like an ? for a variable but I'm unable to
> > >> getting it to work. Can someone explain how to use report variables on
> > >> OLEDB to query an ADAM directory? Is the dynamic sql the solution? How
> > >> can I do this?
> > >>
> > >> Thanks to all!
> > >>
> > >
> > >

RS2005- Pie Chart Percentages and Filter

I have a pie chart with the following filter expression:
=Parameters!Year.Value
The point labels for the pie chart are determined from the following
expression:
=sum(Fields!Expr1.Value)/sum(Fields!Expr1.Value, "SalesDM")
My problem is that the above calulation for percentage is incorrect for the
filtered dataset; the percentage is of the whole dataset. How do I get the
percentage to honor the filter?Hi,
welcome to the MSDN newsgroup.
From your description, I understand you're using the SSRS 2005 to create
some reports, and when using the Pie chart together with some filters on
the data, you found the pie chart always display the value from unfiltered
data, correct?
Based on my local testing, this is likely a project or environment specific
issue. I've tested a Pie chart report with filters setting in both Chart
region and in Dataset and both of them work. Are you using the filters in
chart region or in dataset? Or have you tried other report or datasource to
see whether this is a datasource specific issue.
Please feel free to let me know if there's anything I missed.
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may
learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you for responding, Steven.
My dataset, SalesDM, returns data for several categories over two years.
There are no filters on the dataset. The dataset is used for a table, and is
unfiltered- it returns results as expected. I then use the dataset for a pie
chart. I set up a chart filter for one year's worth of data from the
dataset.- it properly returns results. When I calculate the point labels for
the pie chart, I use the expression in my original post. That calculation
does not take into account the filter applied to the chart.
I'm guessing that I need to reformulate my expression, but I don't know what
the proper formulation should be.
"Steven Cheng[MSFT]" wrote:
> Hi,
> welcome to the MSDN newsgroup.
> From your description, I understand you're using the SSRS 2005 to create
> some reports, and when using the Pie chart together with some filters on
> the data, you found the pie chart always display the value from unfiltered
> data, correct?
> Based on my local testing, this is likely a project or environment specific
> issue. I've tested a Pie chart report with filters setting in both Chart
> region and in Dataset and both of them work. Are you using the filters in
> chart region or in dataset? Or have you tried other report or datasource to
> see whether this is a datasource specific issue.
> Please feel free to let me know if there's anything I missed.
>
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may
> learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||Thanks for your response.
Yes, I agree with you that the problem is specific to the Point Label's
data expression. And I think the problem is likely due to the denominator
in your expression.
the "sum(Fields!Expr1.Value)" will return the current item's sum value on
Expr1 field. However, as for the "sum(Fields!Expr1.Value, "SalesDM")", I'm
not sure what is "SalesDM" exactly, but I guess it is the Dataset's
name(which is bound to your chart), correct? If so, this will cause the
data be retrieved directly from DataSet which is not filtered by the filter
you defined in chart. If this is the case, you can consider specific the
Chart's name in the sum expression. e.g:
sum(Fields!Expr1.Value, "PieChart1")
this will make the data be retrieved from the chart's dataregion which is
filled by the chart's filters. Or alternatively, you can also define
another dataset which use the same filters like your chart control and make
the sum expression specified that dataset as the scope value.
Hope this helps,
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.|||Thank you, Steven! Referencing the chart's dataregion is exactly the answer
I was looking for.
"Steven Cheng[MSFT]" wrote:
> Thanks for your response.
> Yes, I agree with you that the problem is specific to the Point Label's
> data expression. And I think the problem is likely due to the denominator
> in your expression.
> the "sum(Fields!Expr1.Value)" will return the current item's sum value on
> Expr1 field. However, as for the "sum(Fields!Expr1.Value, "SalesDM")", I'm
> not sure what is "SalesDM" exactly, but I guess it is the Dataset's
> name(which is bound to your chart), correct? If so, this will cause the
> data be retrieved directly from DataSet which is not filtered by the filter
> you defined in chart. If this is the case, you can consider specific the
> Chart's name in the sum expression. e.g:
> sum(Fields!Expr1.Value, "PieChart1")
> this will make the data be retrieved from the chart's dataregion which is
> filled by the chart's filters. Or alternatively, you can also define
> another dataset which use the same filters like your chart control and make
> the sum expression specified that dataset as the scope value.
> Hope this helps,
> Regards,
> Steven Cheng
> Microsoft Online Community Support
>
> ==================================================> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ==================================================>
> This posting is provided "AS IS" with no warranties, and confers no rights.
>|||You're welcome!
Also glad that we've got the problem resolved.
Have a good day!
Regards,
Steven Cheng
Microsoft Online Community Support
==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

RS2005 Parameter value persists

I have a simple RS2005 report with 2 parameters, one with a default value
defined and one without.
When the report is viewed in designer "Preview" mode the second parameter
must be selected before "View Report" will run.
When deployed and viewed through Report Manager and IE6, the second
parameter comes up with the old value and the report fills automatically (I
can then select another value for the parameter and things work OK).
I've cleared temp files, restarted, etc. to no avail.
How can I get the deployed version to forget the default value?OK-I seem to have solved this.
Looking in SQL Server's Report Server database, table dbo.Catalog, in the
row for my report, in the Parameter field, I found the erroneous default
value stored. Changing the Default Value in the Report Parameters screen had
no effect on this SQL Server value. Only after removing the parameter,
re-deploying, adding the parameter back and deploying again could I remove
the erroneous default value.
"Paul" wrote:
> I have a simple RS2005 report with 2 parameters, one with a default value
> defined and one without.
> When the report is viewed in designer "Preview" mode the second parameter
> must be selected before "View Report" will run.
> When deployed and viewed through Report Manager and IE6, the second
> parameter comes up with the old value and the report fills automatically (I
> can then select another value for the parameter and things work OK).
> I've cleared temp files, restarted, etc. to no avail.
> How can I get the deployed version to forget the default value?

Monday, March 12, 2012

rs utility and date parameters

Hi there
I'm trying to use the rs utility with a date parameter but I get the
following error:
Unhandled exception:
The value provided for the report parameter 'MonthEndDate' is not valid for
its
type.
I'm using the following at the command prompt:
rs -i MonitoringReport.rss -s http://our-server/reportserver -v
CommissionerCode= "5Axxx" -v MonthEndDate="30 Apr 2006",1,True
I presume the problem is because its a datetime and not a string, but
although I've tried different things, I get the same result. Any suggestions?
Thanks for your help
JezI figured it out. I tried every combination of dates, even replaced the "
with # to no avail until I remembered that Microsoft are American. So I tried
"04/30/2006" and it worked.
Stupid software!!
"PinkRita" wrote:
> Hi there
> I'm trying to use the rs utility with a date parameter but I get the
> following error:
> Unhandled exception:
> The value provided for the report parameter 'MonthEndDate' is not valid for
> its
> type.
> I'm using the following at the command prompt:
> rs -i MonitoringReport.rss -s http://our-server/reportserver -v
> CommissionerCode= "5Axxx" -v MonthEndDate="30 Apr 2006",1,True
> I presume the problem is because its a datetime and not a string, but
> although I've tried different things, I get the same result. Any suggestions?
> Thanks for your help
> Jez

Wednesday, March 7, 2012

RS Howto: TextBox.Hidden = True When TextBox.Value = ""?

Hi,
Is there a way to link the Hidden-property of a Textbox on a Reporting
Services Report to it's Value?
When the Value is empty (""), then I want the TextBox be Hidden. In case you
don't ide the Textbox, there is still white space taken.
Now I have to check in every Hidden-property of the Value of my datasource
is empty or not, but I woudl like to have some general expression that I can
copy paste to every Textbox...
Does anybody knows how to do this?
Thanks a lot in advance, any help will be really appreciated...
PieterPieter wrote:
> Hi,
> Is there a way to link the Hidden-property of a Textbox on a Reporting
> Services Report to it's Value?
> When the Value is empty (""), then I want the TextBox be Hidden. In case you
> don't ide the Textbox, there is still white space taken.
> Now I have to check in every Hidden-property of the Value of my datasource
> is empty or not, but I woudl like to have some general expression that I can
> copy paste to every Textbox...
> Does anybody knows how to do this?
> Thanks a lot in advance, any help will be really appreciated...
> Pieter
Hmmm... you could try adding an event handler for when the text
changes. In that handler, check to see if the text in the text box is
"". Then do your hiding if necessary.