468,550 Members | 1,774 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,550 developers. It's quick & easy.

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.

Aug 14 '08 #1
13 6990
3,405 Expert 2GB
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?

Aug 15 '08 #2

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):

Expand|Select|Wrap|Line Numbers
  1.                     <form name="MyTestForm">
  2.                         <p>
  3.                             <label id="lbl_FirstName" for="FirstName">
  4.                                 First Name:
  5.                             </label>
  6.                             <input name="FirstName" value="First Name">
  7.                         </p>
  8.                         <p>
  9.                             <label id="lbl_LastName" for="LastName">
  10.                                 Last Name:
  11.                             </label>
  12.                             <input name="LastName" value="Last Name">
  13.                         </p>
  14.                         <input class="buttons text_c" name="Test_SaveRet" type="button" value="Save & Return" onClick="SubmitForm(this.name,'<%=PageName%>')">
  15.                         <input class="buttons text_c" name="Test_Cancel" type="button" value="Cancel" onClick="SubmitForm(this.name,'<%=PageName%>')">
  16.                     </form>
When a button on the form is clicked, the following JavaScript function is executed:
Expand|Select|Wrap|Line Numbers
  1.         function SubmitForm(ButtonName,PageName) {
  2.             if (ButtonName == "Test_SaveRet") {
  3.                 document.MyTestForm.action = "test_form_process.asp";
  4.                 document.MyTestForm.method = "post";
  5.                 document.MyTestForm.submit();
  6.             }
  7.             else {
  8.                 alert("ButtonName was not defined.");
  9.             }
  10.         }
The function simply submits the form and opens up the "test_form_process.asp" page. The only function the test_form_process 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.

Aug 18 '08 #3
3,405 Expert 2GB
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:
Expand|Select|Wrap|Line Numbers
  1. for each x in request.form
  2.    session(x) = request.form(x)
  3. next
This puts all of the form data into session-level variables. You can then access them as session("firstName") rather than request("firstName") on all of your pages. Does this help?

Aug 18 '08 #4

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.

Aug 19 '08 #5
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!
Apr 22 '10 #6
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.

May 3 '10 #7
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!
May 4 '10 #8
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.

May 4 '10 #9
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.
May 5 '10 #10
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.

May 6 '10 #11
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.
May 6 '10 #12
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.

May 7 '10 #13
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.
May 10 '10 #14

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Tumurbaatar S. | last post: by
2 posts views Thread by BillCo | last post: by
2 posts views Thread by =?Utf-8?B?R3lhbmVuZHJh?= | last post: by
reply views Thread by NPC403 | last post: by
1 post views Thread by UniDue | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.