Showing posts with label navigate. Show all posts
Showing posts with label navigate. Show all posts

Monday, March 26, 2012

ReportViewer (ASP.NET) and Forms Authentication

I have successfully implemented forms authentication in RS. It works great to navigate to https://myserver/Reports. I get redirected to the login-page etc. It also works great to use the ReportViewer from within my WinForms app, using the

reportViewer.ServerReport.ReportServerCredentials.SetFormsCredentials

method. I'm also able to communicate with RS through it's web services by first calling the 'LogonUser' method. However, to get that to work I had to inherit the ReportExecutionService for the cookie-handling to work.

Now over to my problem (the only thing so far I haven't got working). I'm trying to use a ReportViewer on an ASP.net web page to access the reports. I have understood that 'SetFormsCredentials' is not avaliable here. Instead, as far as I have understood, I should implement my own IReportServerCredentials . The critical method there I guess is

GetFormsCredentials(out Cookie authCookie, out string formsUser, out string formsPassword, out string formsAuthority)

, am I right?

It's here my problem starts. The examples I have seen haven't implemented this method since they use other types of authentication. So, I would need an example of what to fill that method with...

Regards Andreas

Is there at least some documentation where I can read about this...?

(Can't find any examples on it...)

|||

After some more testing, I'm now able to render a report. This is possible if I implement the method like this:

public bool GetFormsCredentials(out Cookie authCookie, out string user, out string password, out string authority)

{

authCookie = null;

user = "validUser";

password = "validPassword";

authority = "";

return true;

}

But from what I can understand this method should be returning a cookie...

And I have done testings with the method described here: http://blogs.msdn.com/bimusings/archive/2005/11/04/489100.aspx, but if I return something else then null as cookie-Value, I get an exception like this:

Client found response content type of 'text/html; charset=utf-8', but expected 'text/xml'.....

So, if I return null as cookie-value I'm able to render the report, but I run into trouble when clicking on a link in the report that navigates to another report. The report isn't rendered, instead the message

  • Execution 'lvzt54q0lq1nrbjjmmubr02b' cannot be found
    is shown.

    Any kind of help here would be of great value!

    Regards Andreas

  • Tuesday, March 20, 2012

    Reports navigation target

    We use frames in our web application and display reports in one of the
    frame. When there is a link within a report to navigate to aother report,
    the the target report would take over the entire browser window. How can I
    set the navigation target to force the new report to stay within its own
    frame?
    Thanks in advance for any tips.Check out the topic "Using URL Access Parameters" in Books Online. I'm amking an assumption that in one frame you have links to reports that will appear in another frame. You should be able to use the rc:LinkTarget parameter in your "menu" link to the frame you want the report to appear in. This should set the report's hyperlinks to the correct target.
    I have not tested this but the documentation makes it appear that this is the way it works.
    HTH
    "Audrey See" wrote:
    > We use frames in our web application and display reports in one of the
    > frame. When there is a link within a report to navigate to aother report,
    > the the target report would take over the entire browser window. How can I
    > set the navigation target to force the new report to stay within its own
    > frame?
    > Thanks in advance for any tips.
    >
    >|||I just did a quick test and indeed setting rc:LinkTarget="your target" will modify the report's hyperlinks so that appear in the given target.
    "C Addison Ritchie" wrote:
    > Check out the topic "Using URL Access Parameters" in Books Online. I'm amking an assumption that in one frame you have links to reports that will appear in another frame. You should be able to use the rc:LinkTarget parameter in your "menu" link to the frame you want the report to appear in. This should set the report's hyperlinks to the correct target.
    > I have not tested this but the documentation makes it appear that this is the way it works.
    > HTH
    > "Audrey See" wrote:
    > > We use frames in our web application and display reports in one of the
    > > frame. When there is a link within a report to navigate to aother report,
    > > the the target report would take over the entire browser window. How can I
    > > set the navigation target to force the new report to stay within its own
    > > frame?
    > >
    > > Thanks in advance for any tips.
    > >
    > >
    > >|||Thanks for your tip.
    I didn't get a chance to apply this on my report until yesterday. But I
    found that your suggestion would not work on my situation.
    My problem is that I can't use URL access directly. On the 'Navigation' tab
    of the link's 'Advanced Properties' sheet, I have to choose 'Jump to report'
    option rather than 'Jump to URL' because I need to carrier report parameters
    from the source reprot to the target report.
    Does anyone else have any other opinion? I believe this should be a very
    common issue.
    "C Addison Ritchie" <CAddisonRitchie@.discussions.microsoft.com> wrote in
    message news:486EB530-AFC2-42BE-8035-B23708B79FD3@.microsoft.com...
    > I just did a quick test and indeed setting rc:LinkTarget="your target"
    will modify the report's hyperlinks so that appear in the given target.
    > "C Addison Ritchie" wrote:
    > > Check out the topic "Using URL Access Parameters" in Books Online. I'm
    amking an assumption that in one frame you have links to reports that will
    appear in another frame. You should be able to use the rc:LinkTarget
    parameter in your "menu" link to the frame you want the report to appear in.
    This should set the report's hyperlinks to the correct target.
    > >
    > > I have not tested this but the documentation makes it appear that this
    is the way it works.
    > >
    > > HTH
    > >
    > > "Audrey See" wrote:
    > >
    > > > We use frames in our web application and display reports in one of the
    > > > frame. When there is a link within a report to navigate to aother
    report,
    > > > the the target report would take over the entire browser window. How
    can I
    > > > set the navigation target to force the new report to stay within its
    own
    > > > frame?
    > > >
    > > > Thanks in advance for any tips.
    > > >
    > > >
    > > >|||Did you ever come up with a solution to this?
    Thanks,
    John Hennesey
    JohnHennesey82@.hotmail.com
    "Audrey See" wrote:
    > Thanks for your tip.
    > I didn't get a chance to apply this on my report until yesterday. But I
    > found that your suggestion would not work on my situation.
    > My problem is that I can't use URL access directly. On the 'Navigation' tab
    > of the link's 'Advanced Properties' sheet, I have to choose 'Jump to report'
    > option rather than 'Jump to URL' because I need to carrier report parameters
    > from the source reprot to the target report.
    > Does anyone else have any other opinion? I believe this should be a very
    > common issue.
    > "C Addison Ritchie" <CAddisonRitchie@.discussions.microsoft.com> wrote in
    > message news:486EB530-AFC2-42BE-8035-B23708B79FD3@.microsoft.com...
    > > I just did a quick test and indeed setting rc:LinkTarget="your target"
    > will modify the report's hyperlinks so that appear in the given target.
    > >
    > > "C Addison Ritchie" wrote:
    > >
    > > > Check out the topic "Using URL Access Parameters" in Books Online. I'm
    > amking an assumption that in one frame you have links to reports that will
    > appear in another frame. You should be able to use the rc:LinkTarget
    > parameter in your "menu" link to the frame you want the report to appear in.
    > This should set the report's hyperlinks to the correct target.
    > > >
    > > > I have not tested this but the documentation makes it appear that this
    > is the way it works.
    > > >
    > > > HTH
    > > >
    > > > "Audrey See" wrote:
    > > >
    > > > > We use frames in our web application and display reports in one of the
    > > > > frame. When there is a link within a report to navigate to aother
    > report,
    > > > > the the target report would take over the entire browser window. How
    > can I
    > > > > set the navigation target to force the new report to stay within its
    > own
    > > > > frame?
    > > > >
    > > > > Thanks in advance for any tips.
    > > > >
    > > > >
    > > > >
    >
    >|||We are having the same issue, has a solution been found?
    "JohnHennesey" wrote:
    > Did you ever come up with a solution to this?
    > Thanks,
    > John Hennesey
    > JohnHennesey82@.hotmail.com
    > "Audrey See" wrote:
    > > Thanks for your tip.
    > > I didn't get a chance to apply this on my report until yesterday. But I
    > > found that your suggestion would not work on my situation.
    > > My problem is that I can't use URL access directly. On the 'Navigation' tab
    > > of the link's 'Advanced Properties' sheet, I have to choose 'Jump to report'
    > > option rather than 'Jump to URL' because I need to carrier report parameters
    > > from the source reprot to the target report.
    > > Does anyone else have any other opinion? I believe this should be a very
    > > common issue.
    > > "C Addison Ritchie" <CAddisonRitchie@.discussions.microsoft.com> wrote in
    > > message news:486EB530-AFC2-42BE-8035-B23708B79FD3@.microsoft.com...
    > > > I just did a quick test and indeed setting rc:LinkTarget="your target"
    > > will modify the report's hyperlinks so that appear in the given target.
    > > >
    > > > "C Addison Ritchie" wrote:
    > > >
    > > > > Check out the topic "Using URL Access Parameters" in Books Online. I'm
    > > amking an assumption that in one frame you have links to reports that will
    > > appear in another frame. You should be able to use the rc:LinkTarget
    > > parameter in your "menu" link to the frame you want the report to appear in.
    > > This should set the report's hyperlinks to the correct target.
    > > > >
    > > > > I have not tested this but the documentation makes it appear that this
    > > is the way it works.
    > > > >
    > > > > HTH
    > > > >
    > > > > "Audrey See" wrote:
    > > > >
    > > > > > We use frames in our web application and display reports in one of the
    > > > > > frame. When there is a link within a report to navigate to aother
    > > report,
    > > > > > the the target report would take over the entire browser window. How
    > > can I
    > > > > > set the navigation target to force the new report to stay within its
    > > own
    > > > > > frame?
    > > > > >
    > > > > > Thanks in advance for any tips.
    > > > > >
    > > > > >
    > > > > >
    > >
    > >
    > >|||Yep - we are using a report proxy that sits between our clients and the
    reporting server. When it relays the html to the client it uses regular
    expressions to search for "target=_top" and change it to the proper window.
    As far as I am concerned this is an enhancement that needs to be addressed -
    if we weren't using a proxy I don't know of a way around it.
    Bummer.
    Good luck,
    John
    "Ray Seppala" wrote:
    > We are having the same issue, has a solution been found?
    > "JohnHennesey" wrote:
    > > Did you ever come up with a solution to this?
    > >
    > > Thanks,
    > > John Hennesey
    > > JohnHennesey82@.hotmail.com
    > >
    > > "Audrey See" wrote:
    > >
    > > > Thanks for your tip.
    > > > I didn't get a chance to apply this on my report until yesterday. But I
    > > > found that your suggestion would not work on my situation.
    > > > My problem is that I can't use URL access directly. On the 'Navigation' tab
    > > > of the link's 'Advanced Properties' sheet, I have to choose 'Jump to report'
    > > > option rather than 'Jump to URL' because I need to carrier report parameters
    > > > from the source reprot to the target report.
    > > > Does anyone else have any other opinion? I believe this should be a very
    > > > common issue.
    > > > "C Addison Ritchie" <CAddisonRitchie@.discussions.microsoft.com> wrote in
    > > > message news:486EB530-AFC2-42BE-8035-B23708B79FD3@.microsoft.com...
    > > > > I just did a quick test and indeed setting rc:LinkTarget="your target"
    > > > will modify the report's hyperlinks so that appear in the given target.
    > > > >
    > > > > "C Addison Ritchie" wrote:
    > > > >
    > > > > > Check out the topic "Using URL Access Parameters" in Books Online. I'm
    > > > amking an assumption that in one frame you have links to reports that will
    > > > appear in another frame. You should be able to use the rc:LinkTarget
    > > > parameter in your "menu" link to the frame you want the report to appear in.
    > > > This should set the report's hyperlinks to the correct target.
    > > > > >
    > > > > > I have not tested this but the documentation makes it appear that this
    > > > is the way it works.
    > > > > >
    > > > > > HTH
    > > > > >
    > > > > > "Audrey See" wrote:
    > > > > >
    > > > > > > We use frames in our web application and display reports in one of the
    > > > > > > frame. When there is a link within a report to navigate to aother
    > > > report,
    > > > > > > the the target report would take over the entire browser window. How
    > > > can I
    > > > > > > set the navigation target to force the new report to stay within its
    > > > own
    > > > > > > frame?
    > > > > > >
    > > > > > > Thanks in advance for any tips.
    > > > > > >
    > > > > > >
    > > > > > >
    > > >
    > > >
    > > >