Showing posts with label msdn. Show all posts
Showing posts with label msdn. Show all posts

Sunday, March 25, 2012

Customising Date Picker

O Great Beings of MSDN,

After much fruitless search I am requesting help on whether there's any way to disable some of the dates in SSRS date picker control.

I have a date parameter in which I want users only be able to select the Fridays. I could show a drop down list of Fridays but that doesn't look too flash, especially when the list has about 2K Fridays.

Any help would be appreciated.

The parameter controls on the standard toolbar cannot be customized. If this is a must have requirement, you need to implement a custom application front end and use the ASP.NET Report Viewer (which is what the Report Manager uses).|||

Thanks Teo,

I think I will have to give up on this one as we already have a custom report protal on which all the RS reports and other reports are displayed. Having another application fire up to collect parameters is not an option for me so that's a bit of bugger.

Hope microsoft can utilise the dataset section in order to provide this in the next service pack. Ie, it would be so much easier if we could have the option of having a list of dates defined in a data set and hence when connected to the datetime parameter, it could use this list to limit the date picker dates that could be chosen by user (having dates that were not in the dataset disabled).

Fortunately the data for this particular report for my company is valid since June 2006 so have implemented the datetime as a drop down list for now (only showing fridays dates after 2006) without the datepicker so the list of Fridays isn't too big just yet.

Totally unsatisfactory from my point of view but that's the best that I could come up with.

Tuesday, March 20, 2012

Custom Security Forms Authentication for Report Manager

I have reviewed/implemented the examples in MSDN, Brian Larson, and T.
Lachev's works for custom security forms authentication for reporting
server(including Lache's Role based structure outlined in the book and DevX
forums).
However, the documentation falls short of configuring the Report Manager for
custom security-forms authentication as well. What procedures would I need to
complete to remove the Windows authentication requirement from the Report
Manager and replace with forms authentication. Specifically, I want to add a
html redirect page to take to "My App" that handles Single Sign on calls(to
LDAP) which will also call the logon user methods from SSRS to establish the
necessary SSRS cookies and allow us to link to the /Reports/Pages/Folder to
access the report manager from within the application.
Specifically: I need sample settings for each of these Report Manager
configuration files
1) Web.Config
2) RSWebApplication.Config
3) rsmgrpolicy.config
Also what location would I have to store the appropriate redirect page and
what path setting do I need to apply to any of the above files to make this
work.
Thanks for any help you can provide.Answered here:
http://www.sqltalk.org/ftopic9114.html&highlight=forms+authentication
Bottom line was web.config for the report manager has to have
<authentication mode="Windows"/>
<authorization>
<allow users="*" />
</authorization>
<identity impersonate="false"/>
And your RSWebapplication.config
should have <loginUrl>/Home.aspx</loginUrl>
Note that your IIS default content will have your redirect page which you
save in your report manager directory and not the home.aspx.

Monday, March 19, 2012

Custom Rendering Extension in SQL 2000 Reporting Services

I am trying to write a custom rendering extension for the SQL Server 2000
version of Reporting Services. The documentation I found on MSDN indicates
that it is possible to write one using Visual Studio .Net 2003 (which is what
I'm using). The samples they have are for VS.Net 2005. I'm trying to
implement it for VS.Net 2003, and I can't seem to find the references for:
Microsoft.ReportingServices.ReportRendering.IRenderingExtension
in SQL 2000 Reporting Services. What is the equivalent in SQL Server 2000
RS and Visual Studio .Net 2003?
Thanks,
Mike SandwickMicrosoft.ReportingServices.ReportRendering.IRenderingExtension is identical
in RS 2000 and RS 2005. In RS 2000 you need to add a reference to
Microsoft.ReportingServices.Processing.dll, in the final RS 2005 release it
would be Microsoft.ReportingServices.ProcessingCore.dll.
-- Robert
This posting is provided "AS IS" with no warranties, and confers no rights.
"Mike Sandwick" <MikeSandwick@.discussions.microsoft.com> wrote in message
news:F9A76586-30EE-450D-993E-7FEE3ADA1BF3@.microsoft.com...
>I am trying to write a custom rendering extension for the SQL Server 2000
> version of Reporting Services. The documentation I found on MSDN
> indicates
> that it is possible to write one using Visual Studio .Net 2003 (which is
> what
> I'm using). The samples they have are for VS.Net 2005. I'm trying to
> implement it for VS.Net 2003, and I can't seem to find the references for:
> Microsoft.ReportingServices.ReportRendering.IRenderingExtension
> in SQL 2000 Reporting Services. What is the equivalent in SQL Server 2000
> RS and Visual Studio .Net 2003?
> Thanks,
> Mike Sandwick|||Thanks, Robert. This is exactly the information I was looking for! I added
the reference to Microsoft.ReportingServices.Processing.dll, and I can now
compile the sample.
Thanks,
Mike Sandwick
"Robert Bruckner [MSFT]" wrote:
> Microsoft.ReportingServices.ReportRendering.IRenderingExtension is identical
> in RS 2000 and RS 2005. In RS 2000 you need to add a reference to
> Microsoft.ReportingServices.Processing.dll, in the final RS 2005 release it
> would be Microsoft.ReportingServices.ProcessingCore.dll.
>
> -- Robert
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
> "Mike Sandwick" <MikeSandwick@.discussions.microsoft.com> wrote in message
> news:F9A76586-30EE-450D-993E-7FEE3ADA1BF3@.microsoft.com...
> >I am trying to write a custom rendering extension for the SQL Server 2000
> > version of Reporting Services. The documentation I found on MSDN
> > indicates
> > that it is possible to write one using Visual Studio .Net 2003 (which is
> > what
> > I'm using). The samples they have are for VS.Net 2005. I'm trying to
> > implement it for VS.Net 2003, and I can't seem to find the references for:
> >
> > Microsoft.ReportingServices.ReportRendering.IRenderingExtension
> >
> > in SQL 2000 Reporting Services. What is the equivalent in SQL Server 2000
> > RS and Visual Studio .Net 2003?
> >
> > Thanks,
> > Mike Sandwick
>
>

Custom renderer samples?

Are there any samples of creating a custom renderer, other than the MSDN
Magazone article that seems to be the only thing that everyone points to? The
documentation on this is meager at best.
Thanks.I don't have anything, but read this a while back, it's from Carlos on the
Spanish MS team.
http://blogs.msdn.com/carloshm/archive/2005/10/18/482022.aspx
Steve MunLeeuw
"Dave Burch" <Dave Burch@.discussions.microsoft.com> wrote in message
news:30BF2111-D432-41A6-B99D-3E98767C1EBA@.microsoft.com...
> Are there any samples of creating a custom renderer, other than the MSDN
> Magazone article that seems to be the only thing that everyone points to?
> The
> documentation on this is meager at best.
> Thanks.
>|||Thanks, I'll have a look at it.
"Steve MunLeeuw" wrote:
> I don't have anything, but read this a while back, it's from Carlos on the
> Spanish MS team.
> http://blogs.msdn.com/carloshm/archive/2005/10/18/482022.aspx
> Steve MunLeeuw
> "Dave Burch" <Dave Burch@.discussions.microsoft.com> wrote in message
> news:30BF2111-D432-41A6-B99D-3E98767C1EBA@.microsoft.com...
> > Are there any samples of creating a custom renderer, other than the MSDN
> > Magazone article that seems to be the only thing that everyone points to?
> > The
> > documentation on this is meager at best.
> >
> > Thanks.
> >
>
>

Sunday, March 11, 2012

Custom Renderer doesn't show in VS report builder

I'm developing a custom report renderer following the instructions
from:
http://msdn.microsoft.com/msdnmag/issues/05/02/CustomRenderers/
So far I can see it and run it as an export option when I run the
report from ReportManager. However it does not show as an option from
the vs.net report builder preview. Any suggestions as to how to make
this work?
Also I can't seem to debug into my renderer, any help with how to step
into this thing would be appreciated.
thanks-JimYou need to add it as a renderer in two different config files, one for
the Report Server, the other for the Report Designer.
C:\Program Files\Microsoft SQL Server\80\Tools\Report
Designer\RSReportDesigner.config
I think is the file you still need to update|||Thanks Greg, that worked. For future reference with vs 2005 and sql
2005 the path was C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies\RSReportDesigner.config. Of course I
had to put my custom dll there also.
-Jim

Sunday, February 19, 2012

Custom authorization with forms authentication

We are currently implementing forms authentication in our RS deployment. The
MSDN sample helped get us started. We are now faced with the authorization
implementation.
How do I go about telling RS which user has access to which folder/report?
Telling RS which users will be administrators? Do I still get to use
role-based security and can create/edit my roles through the Report Manager
or do I need to assign indepentent permissions per user?Ray,
Yes, you would establish role-based security policies just like you would do
with Windows-based security. Your authorization extension will have the
final say if the user is authorized to perform a given action. For example,
if you need to implement role membership rules, you can change the
CheckAccess overloads to account for the addtional rights that the user will
get based on her role membership. Debugging the CheckAccess overloads should
help you clarify how this could be done.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"RayG" <RayG@.discussions.microsoft.com> wrote in message
news:40831253-2400-44A3-8A2E-3FF9171C7510@.microsoft.com...
> We are currently implementing forms authentication in our RS deployment.
The
> MSDN sample helped get us started. We are now faced with the
authorization
> implementation.
> How do I go about telling RS which user has access to which folder/report?
> Telling RS which users will be administrators? Do I still get to use
> role-based security and can create/edit my roles through the Report
Manager
> or do I need to assign indepentent permissions per user?|||Ray,
Let me clarify. The default implementation of a custom authentication
extension as demonstrated in the MS sample relies on the role-based policies
the report administrator has established for a report item. This is very
much the same as the Windows-based role-based security the comes by default
with RS. So, for example if you have a web customer with an id of johndoe
and you want him to view a given report by URL, you can grant him Browser
permissions to that report using the Report Manager. This is pretty much all
you have to do to get John Doe set up for Forms Authentication assuming that
you "inherit" the MS sample code.
At the same time, the Forms Authentication model of RS is very flexible. For
example, it is typically impractical to create role-based security policies
for individual users, especially for Internet-facing applications. Then,
what you can do is to implement additional logic in your CheckAccess
overloads to take in consideration the application role membership your
users have.
The beauty of this model is that the authentication and authorization
implementation is totally outside the Report Server and responsibility of
your extension.
Does this all make sense now?
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"RayG" <RayG@.discussions.microsoft.com> wrote in message
news:B0C6D8D1-B26E-42FA-BB46-CF3918FB15EB@.microsoft.com...
> I think I was under the wrong impression, then.
> Instead of telling RS which user has which type of access to which
resource
> and then letting RS allow or deny access when it receives requests, seems
> like it's me who will decide whether to allow or deny, as I will be
servicing
> the security side of the requests.
> If I am correct and this is the case, how is this role-based security? I
am
> getting a resource and a user and simply responding with a "Yes" or a "No"
> based on my internal logic (security database).
> Please clarify.
> Thanks!
>
> "Teo Lachev" wrote:
> > Ray,
> >
> > Yes, you would establish role-based security policies just like you
would do
> > with Windows-based security. Your authorization extension will have the
> > final say if the user is authorized to perform a given action. For
example,
> > if you need to implement role membership rules, you can change the
> > CheckAccess overloads to account for the addtional rights that the user
will
> > get based on her role membership. Debugging the CheckAccess overloads
should
> > help you clarify how this could be done.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "RayG" <RayG@.discussions.microsoft.com> wrote in message
> > news:40831253-2400-44A3-8A2E-3FF9171C7510@.microsoft.com...
> > > We are currently implementing forms authentication in our RS
deployment.
> > The
> > > MSDN sample helped get us started. We are now faced with the
> > authorization
> > > implementation.
> > >
> > > How do I go about telling RS which user has access to which
folder/report?
> > > Telling RS which users will be administrators? Do I still get to use
> > > role-based security and can create/edit my roles through the Report
> > Manager
> > > or do I need to assign indepentent permissions per user?
>|||Hi Teo,
I am having a problem similar to RayG's, using the forms authentication
sample code. I put some debug statements into the
Microsoft.Samples.ReportingServices.CustomSecurity.Authorization class,
CheckAccess methods. I also commented out the logic in the
AuthenticationExtension and AuthenticationUtilities classes such that all
logon attempts are permitted without password checking (return true).
I found that when accessing report resources using an identity that is
defined in MSRS, that the Authorization.CheckAccess methods are invoked. I
set up security on the Home folder and one subfolder, and was able to use
combinations of groups to restrict access appropriately. I also found that
when you use a logon credential that is not defined in MSRS (that is, not
used in any object's ACL), that the Authorization.CheckAccess methods are not
invoked. For example, I set up a "Users" group, and granted it access to a
folder. Logging on as "Users" I could access this folder. Logging on as
"User" gave me an access denied message, as expected, however, none of the
Authorization.CheckAccess methods were invoked either...unexpected.
This presents a problem, as I am trying to set up groups in MSRS that map to
user groups in my application. It seems that because the
Authorization.CheckAccess methods are not invoked in this case, there is no
opportunity to extend them with custom authorization code which would take
advantage of a user's GenericPrincipal role affiliations (using a
GenericPrincipal object I attached to the HttpContext earlier) to facilitate
group-to-group mapping for confirming or denying access to a resource.
I don't know if this is a bug in MSRS, or if I have simply misconfigured
something. Any ideas? Thanks.
-Rob Hoffman
"Teo Lachev" wrote:
> Ray,
> Yes, you would establish role-based security policies just like you would do
> with Windows-based security. Your authorization extension will have the
> final say if the user is authorized to perform a given action. For example,
> if you need to implement role membership rules, you can change the
> CheckAccess overloads to account for the addtional rights that the user will
> get based on her role membership. Debugging the CheckAccess overloads should
> help you clarify how this could be done.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
> "RayG" <RayG@.discussions.microsoft.com> wrote in message
> news:40831253-2400-44A3-8A2E-3FF9171C7510@.microsoft.com...
> > We are currently implementing forms authentication in our RS deployment.
> The
> > MSDN sample helped get us started. We are now faced with the
> authorization
> > implementation.
> >
> > How do I go about telling RS which user has access to which folder/report?
> > Telling RS which users will be administrators? Do I still get to use
> > role-based security and can create/edit my roles through the Report
> Manager
> > or do I need to assign indepentent permissions per user?
>
>|||Rob,
How did you test that CheckAccess overloads are not invoked? Please note
that they will be invoked only during runtime. If you use the Report Manager
they are not invoked. Instead, GetPermissions will be called. Therefore, you
need to duplicate the same permission checks in GetPermissions as you would
in CheckAccess. I suggest you refactor the common logic from CheckAccess
overloads in a helper function so can be easily reused.
So, just like with Windows authentication, your security authentication
extensions will authenticate the user based on the user identity. In other
words, if I am Bob and I belong to role Sales Reps, I will log in as Bob. In
my authorization extension I will authorize the user based on the user
identity and role membership. Once again, you need to do this in both
CheckAccess and GetPermissions, the later being used by the Report Manager
as a result to a call to the GetPermissions SOAP API.
--
Hope this helps.
----
Teo Lachev, MCSD, MCT
Author: "Microsoft Reporting Services in Action"
Publisher website: http://www.manning.com/lachev
Buy it from Amazon.com: http://shrinkster.com/eq
Home page and blog: http://www.prologika.com/
----
"Rob Hoffman" <RobHoffman@.discussions.microsoft.com> wrote in message
news:7BE3E0A3-95C0-46D3-B589-7AAB38A38B1D@.microsoft.com...
> Hi Teo,
> I am having a problem similar to RayG's, using the forms authentication
> sample code. I put some debug statements into the
> Microsoft.Samples.ReportingServices.CustomSecurity.Authorization class,
> CheckAccess methods. I also commented out the logic in the
> AuthenticationExtension and AuthenticationUtilities classes such that all
> logon attempts are permitted without password checking (return true).
> I found that when accessing report resources using an identity that is
> defined in MSRS, that the Authorization.CheckAccess methods are invoked.
I
> set up security on the Home folder and one subfolder, and was able to use
> combinations of groups to restrict access appropriately. I also found
that
> when you use a logon credential that is not defined in MSRS (that is, not
> used in any object's ACL), that the Authorization.CheckAccess methods are
not
> invoked. For example, I set up a "Users" group, and granted it access to
a
> folder. Logging on as "Users" I could access this folder. Logging on as
> "User" gave me an access denied message, as expected, however, none of the
> Authorization.CheckAccess methods were invoked either...unexpected.
> This presents a problem, as I am trying to set up groups in MSRS that map
to
> user groups in my application. It seems that because the
> Authorization.CheckAccess methods are not invoked in this case, there is
no
> opportunity to extend them with custom authorization code which would take
> advantage of a user's GenericPrincipal role affiliations (using a
> GenericPrincipal object I attached to the HttpContext earlier) to
facilitate
> group-to-group mapping for confirming or denying access to a resource.
> I don't know if this is a bug in MSRS, or if I have simply misconfigured
> something. Any ideas? Thanks.
> -Rob Hoffman
> "Teo Lachev" wrote:
> > Ray,
> >
> > Yes, you would establish role-based security policies just like you
would do
> > with Windows-based security. Your authorization extension will have the
> > final say if the user is authorized to perform a given action. For
example,
> > if you need to implement role membership rules, you can change the
> > CheckAccess overloads to account for the addtional rights that the user
will
> > get based on her role membership. Debugging the CheckAccess overloads
should
> > help you clarify how this could be done.
> >
> > --
> > Hope this helps.
> >
> > ----
> > Teo Lachev, MCSD, MCT
> > Author: "Microsoft Reporting Services in Action"
> > Publisher website: http://www.manning.com/lachev
> > Buy it from Amazon.com: http://shrinkster.com/eq
> > Home page and blog: http://www.prologika.com/
> > ----
> >
> > "RayG" <RayG@.discussions.microsoft.com> wrote in message
> > news:40831253-2400-44A3-8A2E-3FF9171C7510@.microsoft.com...
> > > We are currently implementing forms authentication in our RS
deployment.
> > The
> > > MSDN sample helped get us started. We are now faced with the
> > authorization
> > > implementation.
> > >
> > > How do I go about telling RS which user has access to which
folder/report?
> > > Telling RS which users will be administrators? Do I still get to use
> > > role-based security and can create/edit my roles through the Report
> > Manager
> > > or do I need to assign indepentent permissions per user?
> >
> >
> >|||Teo,
Thanks for turning me on to the GetPermissions method...adding a role check
there did the trick. To check the invocation of the CheckAccess overloads, I
just wrote some debug statements to a log file. Thanks again for your help.
-Rob Hoffman
"Teo Lachev" wrote:
> Rob,
> How did you test that CheckAccess overloads are not invoked? Please note
> that they will be invoked only during runtime. If you use the Report Manager
> they are not invoked. Instead, GetPermissions will be called. Therefore, you
> need to duplicate the same permission checks in GetPermissions as you would
> in CheckAccess. I suggest you refactor the common logic from CheckAccess
> overloads in a helper function so can be easily reused.
> So, just like with Windows authentication, your security authentication
> extensions will authenticate the user based on the user identity. In other
> words, if I am Bob and I belong to role Sales Reps, I will log in as Bob. In
> my authorization extension I will authorize the user based on the user
> identity and role membership. Once again, you need to do this in both
> CheckAccess and GetPermissions, the later being used by the Report Manager
> as a result to a call to the GetPermissions SOAP API.
> --
> Hope this helps.
> ----
> Teo Lachev, MCSD, MCT
> Author: "Microsoft Reporting Services in Action"
> Publisher website: http://www.manning.com/lachev
> Buy it from Amazon.com: http://shrinkster.com/eq
> Home page and blog: http://www.prologika.com/
> ----
[SNIPPED]

Custom Auth / SSRS 2005 / ASP.NET

Hi,
I've implemented the custom authentication provider as prescribed by MSDN
documentation. Everything is working pretty much as expected, however, I
want to programatically retreive information about the report (such as the
datasources, parameters, etc.)
I extended a class for RSExecutionService and can get an authentication
cookie back etc. However, if I want to use the
rs.GetDataSourceContents(dataSource) method, I get a response saying the
object is moved.
The request failed with the error message:
--
<html><head><title>Object moved</title></head><body>
<h2>Object moved to <a
href="http://links.10026.com/?link=/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx">here</a>.</h2>
</body></html>
Ideas on how to get around this?
Thanks,
ChrisNevermind... Should read the word "Proxy" closer... and think before
coding...
solved, works like a charm. Man I love inheritance.
"Chris Taylor" <ctaylor7480@.newsgroups.nospam> wrote in message
news:upSzMR4IGHA.3984@.TK2MSFTNGP14.phx.gbl...
> Hi,
> I've implemented the custom authentication provider as prescribed by MSDN
> documentation. Everything is working pretty much as expected, however, I
> want to programatically retreive information about the report (such as the
> datasources, parameters, etc.)
> I extended a class for RSExecutionService and can get an authentication
> cookie back etc. However, if I want to use the
> rs.GetDataSourceContents(dataSource) method, I get a response saying the
> object is moved.
> The request failed with the error message:
> --
> <html><head><title>Object moved</title></head><body>
> <h2>Object moved to <a
> href="http://links.10026.com/?link=/ReportServer/logon.aspx?ReturnUrl=%2fReportServer%2fReportService.asmx">here</a>.</h2>
> </body></html>
> Ideas on how to get around this?
> Thanks,
> Chris
>