Showing posts with label iframe. Show all posts
Showing posts with label iframe. Show all posts

Friday, March 23, 2012

Open URL in new page from a frame

Hi, i have a problem:
- I need to open a report in a new page, from a report contained in a
iFrame of a aspx page
I tried a javascript window.open command in the "jump to URL" property.
But:
- If i run the report in Explorer, i click and the report is correctly
open in a new page
- If i run the report in the iFrame of the aspx page, i click but the
report is wrongly open in the same page
I tried a lot but i can't see the right way. I really need help.
P.S. Sorry for my bad English LanguageHere is an example of a Jump to URL link I use. This causes Excel to come up
with the data in a separate window:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
If you don't want to have it appear in a new window then do this in jump to
URL:
=Globals!ReportServerUrl & "?/SomeFolder/SomeReport&ParamName=" &
Parameters!ParamName.Value & "&rs:Format=CSV&rc:Encoding=ASCII"
This capability was introduced with RS2000 SP1
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Boa" <mugnaboa@.gmail.com> wrote in message
news:1156498995.499936.169520@.h48g2000cwc.googlegroups.com...
> Hi, i have a problem:
> - I need to open a report in a new page, from a report contained in a
> iFrame of a aspx page
> I tried a javascript window.open command in the "jump to URL" property.
> But:
> - If i run the report in Explorer, i click and the report is correctly
> open in a new page
> - If i run the report in the iFrame of the aspx page, i click but the
> report is wrongly open in the same page
> I tried a lot but i can't see the right way. I really need help.
> P.S. Sorry for my bad English Language
>|||I tried a lot of solutions, serious end crazy solutions, but i'm always
in the same situation: i can't open a link in a new page if ny report
is in a iFrame.
[URL=http://img177.imageshack.us/my.php?image=tabellatentativinf4.jpg][IMG]http://img177.imageshack.us/img177/4769/tabellatentativinf4.th.jpg[/IMG][/URL]
In the image u can see my attempts, in the Explorer Column i explain
the result if i run the report directly in the explorer's page, in the
iFrame Column i explain the result if i run the report in my
application. I need to find a "new page" in the iFrame column.
Any idea?|||Bruce ... i need your help!|||Sorry, I don't know why it isn't working. I haven't done what you are trying
to do.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Boa" <mugnaboa@.gmail.com> wrote in message
news:1157640447.600521.206140@.b28g2000cwb.googlegroups.com...
> Bruce ... i need your help!
>

Monday, March 19, 2012

Open New Window from Iframe

I am having this problem. Any thoughts?
the standard way of opening a new window using the Jump To URL
navigation feature - ie using the
="javascript:void(window.open('someURL'))" works great as long as the
report containing these links is NOT in an IFRAME. If it is, it's
treating the Javascript as the URL.
Anyone getting same results? Anyone know of a workaround?This is one I use. But, this opens it up in a new window.
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
I worked with someone about a week ago who wanted to do what you do. This is
what I believed worked for him. Let's say your iframe is called main. Then
do this:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
"&rs:Format=CSV&rc:Encoding=ASCII','main'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Raz" <Raz@.discussions.microsoft.com> wrote in message
news:184220F9-B42F-42B9-80F1-ED8946C29EB6@.microsoft.com...
>I am having this problem. Any thoughts?
> the standard way of opening a new window using the Jump To URL
> navigation feature - ie using the
> ="javascript:void(window.open('someURL'))" works great as long as the
> report containing these links is NOT in an IFRAME. If it is, it's
> treating the Javascript as the URL.
> Anyone getting same results? Anyone know of a workaround?
>|||Thanks for the Reply Bruce. I have read many of your posts and have already
tried opening a window using your technique. Actually the technique works
fine except for when you are opening a window from an Iframe the address bar
in the new window shows
"javascript:void(window.open('http://www.google.com','_blank'))" instead of
the url "http://www.google.com" of course the result of this is "Page cannot
be displayed"
Any thoughts?
"Bruce L-C [MVP]" wrote:
> This is one I use. But, this opens it up in a new window.
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> I worked with someone about a week ago who wanted to do what you do. This is
> what I believed worked for him. Let's say your iframe is called main. Then
> do this:
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> "&rs:Format=CSV&rc:Encoding=ASCII','main'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Raz" <Raz@.discussions.microsoft.com> wrote in message
> news:184220F9-B42F-42B9-80F1-ED8946C29EB6@.microsoft.com...
> >I am having this problem. Any thoughts?
> >
> > the standard way of opening a new window using the Jump To URL
> > navigation feature - ie using the
> > ="javascript:void(window.open('someURL'))" works great as long as the
> > report containing these links is NOT in an IFRAME. If it is, it's
> > treating the Javascript as the URL.
> >
> > Anyone getting same results? Anyone know of a workaround?
> >
>
>|||Just to let everyone know I go this working by including &rc:linktarget=_self
in the url to the report server.
"Raz" wrote:
> Thanks for the Reply Bruce. I have read many of your posts and have already
> tried opening a window using your technique. Actually the technique works
> fine except for when you are opening a window from an Iframe the address bar
> in the new window shows
> "javascript:void(window.open('http://www.google.com','_blank'))" instead of
> the url "http://www.google.com" of course the result of this is "Page cannot
> be displayed"
> Any thoughts?
> "Bruce L-C [MVP]" wrote:
> > This is one I use. But, this opens it up in a new window.
> >
> > ="javascript:void(window.open('" & Globals!ReportServerUrl &
> > "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> > "&rs:Format=CSV&rc:Encoding=ASCII','_blank'))"
> >
> > I worked with someone about a week ago who wanted to do what you do. This is
> > what I believed worked for him. Let's say your iframe is called main. Then
> > do this:
> >
> > ="javascript:void(window.open('" & Globals!ReportServerUrl &
> > "?/SomeFolder/SomeReport&ParamName=" & Parameters!ParamName.Value &
> > "&rs:Format=CSV&rc:Encoding=ASCII','main'))"
> >
> >
> > --
> > Bruce Loehle-Conger
> > MVP SQL Server Reporting Services
> >
> >
> >
> > "Raz" <Raz@.discussions.microsoft.com> wrote in message
> > news:184220F9-B42F-42B9-80F1-ED8946C29EB6@.microsoft.com...
> > >I am having this problem. Any thoughts?
> > >
> > > the standard way of opening a new window using the Jump To URL
> > > navigation feature - ie using the
> > > ="javascript:void(window.open('someURL'))" works great as long as the
> > > report containing these links is NOT in an IFRAME. If it is, it's
> > > treating the Javascript as the URL.
> > >
> > > Anyone getting same results? Anyone know of a workaround?
> > >
> >
> >
> >