Thanks Rob. That almost works. I can display a report in the IFrame without
exposing the SchoolID to the user. Unfortunately, as soon as the user
with the SchoolID in the URL. Did I overlook something in your explanation
"Rob" <Rob@discussions.microsoft.com> wrote in message
news:2644EBC0-B167-4165-A669-2197FD90987C@microsoft.com...
> hi
>
> (hopefully, this sample code will make it thru to the forum)
>
> ReportViewer.codebehind (relevant part)...
>
> Private Sub ViewReport(ByVal key As String, ByVal reporttype As String)
> Dim iReportViewer As HtmlControl =
> CType(Me.FindControl("iReportViewer"), HtmlControl)
> Dim rptid As String = Request.QueryString("id")
> Dim qs As String = Request.QueryString("qs")
> Select Case rptid
> Case (this is my report number, ie. "id")
> Case (whatever the report # is....)
> Case 808 ' my Build Schedule Report
> If qs = "All" Then ' they f'd up using All, can't be
> quoted...
> iReportViewer.Attributes("src") =
> "http://localhost/ReportServer?%2f8_Build_Schedule%2frptBuildSchedule_8&BMP=All&rs:Command=Render"
> Else
> iReportViewer.Attributes("src") =
> "http://localhost/ReportServer?%2f8_Build_Schedule%2frptBuildSchedule_8&BMP='"
> + qs + "'&rs:Command=Render"
> End If
> iReportViewer.Attributes("width") = "100%"
> iReportViewer.Attributes("height") = "100%"
> Case Else
> ' your exception code
> End Select
> End Sub
>
> Shell of what you need for ReportViewer.aspx
>
> <%@ Page Language="vb" AutoEventWireup="false"
> Codebehind="ReportViewer.aspx.vb" Inherits="Robs.ReportViewer"%>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML>
> <HEAD>
> <title>My Little Report Viewer - House or Horror</title>
> <meta name="vs_targetSchema"
> content="
http://schemas.microsoft.com/intellisense/ie5"> > </HEAD>
> <body>
> <iframe runat="server" id="iReportViewer" style="BACKGROUND-COLOR:
> #990000" name="doc" frameBorder="no"
> width="100%" scrolling="auto" height="100%"></iframe>
> </body>
> </HTML>
>
> That's it...
>
> If you have AD for authentication, it'll take what you have (if SSRS
> configured). When I play at home, it puts an 'in my face' login (since I'm
> not running AD at home).
>
> Good Luck - Rob
>
> "Brendan Reynolds" wrote:
>
>> Thanks Rob. That looks promising. Unfortunately, my client-side scripting
>> skills are almost non-existent, and I'm having a hard time getting to
>> grips
>> with this. Here's what I've done so far ...
>>
>> I have an ASP.NET page with a listbox that displays available reports and
>> a
>> literal control for the iframe. Here's the relevant part of the page's
>> HTML
>> ....
>>
>> <TR>
>> <TD style="HEIGHT: 251px" vAlign="top" width="50%">
>> <asp:ListBox id="lstReports" runat="server" Width="100%"
>> Height="295px" AutoPostBack="True">
>> </asp:ListBox>
>> </TD>
>> <TD style="HEIGHT: 251px" vAlign="top" width="50%">
>> <asp:Literal id="MyLiteral" runat="server">
>> <IFRAME id="MyIFrame"></IFRAME>
>> </asp:Literal>
>> </TD>
>> </TR>
>>
>> I've translated your code into C#, which is what my page is using, and
>> put
>> it in the SelectedIndexChanged event procedure of my listbox ...
>>
>> private void lstReports_SelectedIndexChanged(object sender,
>> System.EventArgs
>> e)
>> {
>> string popupScript = @"<script language='javascript'> "
>> + @"var newwin = window.open('ReportViewer.aspx?"
>> + @"id=myreportid&qs=myquerystring', 'ReportViewer', "
>> + @"'menubar=no, toolbar=no, resizable=no'); "
>> + @"newwin.window.moveTo(0,0); newwin.window.resizeTo"
>> + @"(screen.availWidth, screen.availHeight);"
>> + @"newwin.focus();<script>";
>> this.RegisterStartupScript("PopupScript", popupScript);
>> }
>>
>> My first question is - what do I need to change to load
>> 'ReportViewer.aspx'
>> into the iframe?
>>
>> --
>> Brendan Reynolds (MVP)
>>
>>
>> "Rob" <Rob@discussions.microsoft.com> wrote in message
>> news:B4EE1DC9-6448-4CD8-8F98-05FF9713E592@microsoft.com...
>> > hi brendan
>> >
>> > here's the solution I used (with a little bit of verbage to describe my
>> > scenario):
>> >
>> > 1. I've built an ASP.NET site (in addition to the regular SSRS
>> > interface
>> > for
>> > reports).
>> > 2. This addition site looks almost like the browser interface for this
>> > discussion group (ie. Treeview control on the left which groups 'like'
>> > reports and an iframe right half which brings up the report criteria
>> > form
>> > associated with the selected report, from the Treeview control on the
>> > left).
>> > 3. on 'View Report' click from the iframed report(s) criteria page, I
>> > do
>> > the
>> > following in ASP.NET:
>> >
>> > Dim popupScript As String = "<script
>> > language='javascript'>"
>> > & _
>> > "var newwin =
>> > window.open('ReportViewer.aspx?id=myreportid&qs=myquerystring',
>> > 'ReportViewer', 'menubar=no, toolbar=no, resizable=no');
>> > newwin.window.moveTo(0,0);
>> > newwin.window.resizeTo(screen.availWidth,screen.availHeight);
>> > newwin.focus();</script>"
>> > Page.RegisterStartupScript("PopupScript", popupScript)
>> >
>> > 4. This opens up ReportViewer.aspx which iframes the call to SSRS. The
>> > benefits of this is different report interfaces can be built on
>> > differents
>> > sites AND there are no issue with this approach as far as 'cross-site
>> > scripting'. For instance, my financial group has the own SSRS ASP.NET
>> > interface, as well as other groups... They ALL point in the pop-up to
>> > the
>> > SSRS site and get a previewed report (with report parameter fields if
>> > they
>> > want to make changes). Also, ReportViewer.aspx changes the iframe src
>> > value
>> > to what was passed to it from the reportcriteria .aspx.
>> >
>> > 5. Since the way the pop-up is created, there's no URL Address info and
>> > the
>> > ReportViewer.aspx masks the URL by replacing the title.
>> >
>> > Rob
>> >
>> > "Brendan Reynolds" wrote:
>> >
>> >>
>> >> I'm trying to integrate SQL Server Reporting Services reports into an
>> >> ASP.NET app (SRS 2000, ASP.NET 1.1). I know how to do this using
>> >> direct
>> >> URL
>> >> addressing, but this exposes in the query string parameters that
>> >> should
>> >> not
>> >> be exposed. Each user is associated with a school, and should see only
>> >> that
>> >> school's data. When the user logs in, I retrieve the SchoolID
>> >> associated