Friday, March 30, 2012

Jump to URL with IFRAME

Hi all,
After a couple hours digging through the archives, I've decided to ask
for some guidance from the experts.
Here's the deal: I have a classic ASP application. This application
has a number of reports that were generated in asp as raw html
tables. We've decided to replace these reports piecemeal, one at a
time, with a Reporting Services Report, contained in an IFRAME.
That portion is complete, and working great. The problem is that the
report has two 'clickable' columns, to take the user to related info,
one to an order report, and another to a contact page.
I've been working on the 'order' portion. I have edited the OrderID
textbox to have a 'Jump To URL' expression:
= "javascript:void(window.open('http://localhost/process.asp?
pg=reports&mode=update&OrderID=" & Fields!OrderID.Value & "','_top'))"
I have called the IFRAME src like:
http://192.168.100.11/ReportServer/Pages/ReportViewer.aspx?%2fReportingServices%2fOrdersByDate_v30.7&rs:Command=Render&rs:LinkTarget=_top
All works swimmingly up to this point. Even if I directly access the
page the IFRAME would point to, I get the report, and the orderIDs
look like links, and behave properly, replacing the RS report with a
page from the asp app pertaining to the order they clicked on.
Unfortunately, when I access the report THROUGH the IFRAME, absolutely
nothing happens. No errors, no action of any kind. Other people have
indicated that their location bar got the contents of the Jump to
link, but I'm not seeing that. its as thought the link is clicked but
some process overrides it.
Three additional pieces of information: the browser I'm testing on is
IE7. The report has interactive sorting on the columns, which happens
to work perfectly through the iframe. I am using RS2005.
Any suggestions or advice would be most appreciated! Thanks!
BrianYou can trap the click envent on the report viewer.
As for the URL you have added javascript to It , I am not sure if it will be
executed.
You can try to use this sinstead:
= "http://localhost/process.asp?
> pg=reports&mode=update&OrderID=" & Fields!OrderID.Value
But the thing is this will load in the IFrame, so you will have tow choises
1- Do not use IFrame
2- Put in the requested page to redirect the parent page to it is URL.
Meaning: the page that you need to naviigate to will check if it is contained
in an IFrame and if True it will redirect the parent Frame to its URL.
Hope this will help.
"Brian Ackermann" wrote:
> Hi all,
> After a couple hours digging through the archives, I've decided to ask
> for some guidance from the experts.
> Here's the deal: I have a classic ASP application. This application
> has a number of reports that were generated in asp as raw html
> tables. We've decided to replace these reports piecemeal, one at a
> time, with a Reporting Services Report, contained in an IFRAME.
> That portion is complete, and working great. The problem is that the
> report has two 'clickable' columns, to take the user to related info,
> one to an order report, and another to a contact page.
> I've been working on the 'order' portion. I have edited the OrderID
> textbox to have a 'Jump To URL' expression:
> = "javascript:void(window.open('http://localhost/process.asp?
> pg=reports&mode=update&OrderID=" & Fields!OrderID.Value & "','_top'))"
> I have called the IFRAME src like:
> http://192.168.100.11/ReportServer/Pages/ReportViewer.aspx?%2fReportingServices%2fOrdersByDate_v30.7&rs:Command=Render&rs:LinkTarget=_top
> All works swimmingly up to this point. Even if I directly access the
> page the IFRAME would point to, I get the report, and the orderIDs
> look like links, and behave properly, replacing the RS report with a
> page from the asp app pertaining to the order they clicked on.
> Unfortunately, when I access the report THROUGH the IFRAME, absolutely
> nothing happens. No errors, no action of any kind. Other people have
> indicated that their location bar got the contents of the Jump to
> link, but I'm not seeing that. its as thought the link is clicked but
> some process overrides it.
> Three additional pieces of information: the browser I'm testing on is
> IE7. The report has interactive sorting on the columns, which happens
> to work perfectly through the iframe. I am using RS2005.
> Any suggestions or advice would be most appreciated! Thanks!
> Brian
>|||Paul,
Thanks for your reply. I discovered the answer to this before I saw
your reply,but your solution did the job. Additionally passing
rs:LinkTarget=_top
as part of the IFRAMES src URL, the links, when clicked, open in the
browser window, not the IFRAME
Brian

No comments:

Post a Comment