SSRS Report Viewer Intercepting Request Object Values

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • BLKeller
    New Member
    • Aug 2008
    • 3

    SSRS Report Viewer Intercepting Request Object Values

    I'm having a problem with a site I'm working on which contains links to Reporting Services reports. The pages are written in HTML and classic ASP. The links to the reports are in the following format:



    The problem occurs after I open a report from the site. Prior to opening any reports, the forms I've created on the site work fine, but after a report is run, the values sent across by the Post method are no longer sent to the receiving page, which should be processing the values sent to it. If I change the report URL to view the report in Report Manager (http://ServerName/Reports/Pages/Report.aspx?ItemPath=...) the forms do work correctly, however, I don't really want to do it this way because I don't want users to be able to access other reports on the Report Manager.

    I've looked around for the past couple of days and have not found anything regarding why this problem would occur. I'm thinking the issue might be due to the fact that the SQL Server and the web server are running on the same machine. I have done this type of development in the past without running into this issue, however, in those other cases, the SQL Server was running on one machine, while the web server was running on another.

    My knowledge of what goes on behind the scenes with web pages and the Reporting Services Report Viewer is somewhat limited, so hopefully I'm not asking a very obvious question and hopefully I can comprehend any answers that anyone can supply.

    I'm using:

    SQL Server 2005
    Visual Studio 2005 (for report development)
    IIS 5.1
    Window XP (SP2)
    Dreamweaver MX (for web development)

    Any ideas anyone can provider would be appreciated.

    Thanks!
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    It's hard to answer this question, since I don't like to mix ASP and other technologies, but I'll try to help. What format are the dead links in?

    Jared

    Comment

    • BLKeller
      New Member
      • Aug 2008
      • 3

      #3
      Jared,

      I appreciate your willingness to help.

      After I open a report from the site, any form I attempt to submit no longer passes data to the ASP page that should be processing it. I'm thinking that something the report does is keeping anything from the Request object from getting to the processing page. To verify what was happing, I created a quick test page on my site so that I could test the submit, without actually really sending anything to my database. Here is the test form's HTML code (this is just the form, not the entire page):

      Code:
      					<form name="MyTestForm">
      						<p>
      							<label id="lbl_FirstName" for="FirstName">
      								First Name:
      							</label>
      							<input name="FirstName" value="First Name">
      						</p>
      						<p>
      							<label id="lbl_LastName" for="LastName">
      								Last Name:
      							</label>
      							<input name="LastName" value="Last Name">
      						</p>
      						<input class="buttons text_c" name="Test_SaveRet" type="button" value="Save & Return" onClick="SubmitForm(this.name,'<%=PageName%>')">
      						<input class="buttons text_c" name="Test_Cancel" type="button" value="Cancel" onClick="SubmitForm(this.name,'<%=PageName%>')">
      					</form>
      When a button on the form is clicked, the following JavaScript function is executed:
      Code:
      		function SubmitForm(ButtonName,PageName) {
      			if (ButtonName == "Test_SaveRet") {
      				document.MyTestForm.action = "test_form_process.asp";
      				document.MyTestForm.method = "post";
      				document.MyTestForm.submit();
      			}
      			else {
      				alert("ButtonName was not defined.");
      			}
      		}
      The function simply submits the form and opens up the "test_form_proc ess.asp" page. The only function the test_form_proce ss page has is to display what is in the request object, which, after a report is opened, turns out to be nothing.

      Thanks for any help you can give.

      Brenda
      Last edited by jhardman; Aug 18 '08, 04:21 PM. Reason: put code in code tags. please note button marked #

      Comment

      • jhardman
        Recognized Expert Specialist
        • Jan 2007
        • 3405

        #4
        OK, I think I have an idea. The request object is only going to be populated on the first page that receives the form submission, all subsequent pages will not have access to them, as if the data was all lost. before you open any kind of report, go to a page that does this:
        Code:
        for each x in request.form
           session(x) = request.form(x)
        next
        This puts all of the form data into session-level variables. You can then access them as session("firstN ame") rather than request("firstN ame") on all of your pages. Does this help?

        Jared

        Comment

        • BLKeller
          New Member
          • Aug 2008
          • 3

          #5
          Jared,

          I appreciate your reply and your suggestion. I haven't done much with session variables in the past and I'm not sure exactly how your suggestion would work. The site I'm working on has several forms on different pages. I think a lot of rework would need to be done in order to use the session variables instead of the Request.Form objects.

          For now, I have changed my report links to use the Report Manager, instead of the Report Viewer and I think that once I move the site to the production environment, I shouldn't have any problems using the Report Viewer again, since the report server and web server are on two different machines.

          I guess I basically wanted to find out if anyone had heard of this situation before where opening an SSRS report from a link on a web page interferes with the Request object submitting values to another page.

          Thanks for your help.

          Brenda

          Comment

          • paul1035
            New Member
            • Apr 2010
            • 5

            #6
            Browser Specific

            I'm not sure if this issue was ever addressed or solved, but I am having this exact same issue. If it has been solved, I'd love to hear the fix. But one thing I also determined is that this is browser specific as this issue doesn't happen in Firefox or Chrome, it only happens in Internet Explorer (currently using IE8). So if there is any more detail on this issue, I'd love to hear. Thanks!

            Comment

            • sp4tech
              New Member
              • May 2010
              • 4

              #7
              hi
              As you mentioned, you were able to display the SSRS report based on the parameters passed from ASP page. I was trying to replicate your scenario at least when (web and SQL server are on diff machines) but I am not able to create that scenario.
              Could you please tell me how did you successfully do it. so that I can move further fo your issue.

              thanks

              Comment

              • paul1035
                New Member
                • Apr 2010
                • 5

                #8
                Details

                Well first off, my server hosts both the web page and the SQL and the SQL reports. I am using IIS7 and SQL Server 2008 with Reporting Services. We recently upgraded to using Windows Server 2008 with IIS7, as well as using SQL Server 2008. In the past, we used our web application on Windows Server 2003 with SQL Server 2005. In that scenario, there were no issues. We only just started noticing this problem when we starting using IIS7 with SQL 2008. And again, like I said before, it only happens when using Internet Explorer.

                And thanks for responding!

                Comment

                • sp4tech
                  New Member
                  • May 2010
                  • 4

                  #9
                  No I am not able to understand that how the classic ASP can pass the parameters to SSRS reports and run the report through classic ASP? If u could publish the code, would be helpful

                  Did u get my point?
                  We have one web server and another sql server reporting services.

                  Regards,

                  Comment

                  • paul1035
                    New Member
                    • Apr 2010
                    • 5

                    #10
                    Well I figured out a solution that works for me. I have my web application running on port 80. And from what I've been reading, putting the 2 items on separate servers solves the issues. So I went ahead and changed the SSRS ReportServer to use port 81 and now everything is working fine. So keeping the 2 items separate is the key it seems.

                    Comment

                    • sp4tech
                      New Member
                      • May 2010
                      • 4

                      #11
                      That's good.

                      But can you please tell me how can I use this SSRS report viewer control in classic ASP? This is the main problem I am facing. I had used crystal reports in classic ASP.

                      Regards,

                      Comment

                      • paul1035
                        New Member
                        • Apr 2010
                        • 5

                        #12
                        Embedded Reports

                        Well how we are using it is we are just opening up the reports in a iframe within our app, and we are just linking to the report with http://ourserver:81/reportserver and then making the reports look like they are embedded into the app. Otherwise, you can actually embed your reports following something similar to this link: http://www.codeproject.com/KB/report...iewer2005.aspx
                        They have a good walk through of embedding reports into your ASP.NET app.

                        Comment

                        • sp4tech
                          New Member
                          • May 2010
                          • 4

                          #13
                          So you trying to display the whole Report server admin page to all the users. Correct? I think that could be one of the drawback we need to use report viewer. Is it?
                          Ya. using .NET for report viewer is easy than using in classic ASP.

                          Regards,

                          Comment

                          • paul1035
                            New Member
                            • Apr 2010
                            • 5

                            #14
                            Well when you view the reports using the reportserver links, then you aren't quite linking to the admin page as they can't change anything from that view, they only view the report itself with no other options, other than parameters. So that is why this issue came to be, because we didn't want to link to the pages under the reports manager, instead we wanted to link to them using reportserver because it only shows the reports that way.

                            Comment

                            Working...