Friday, March 30, 2012

Jump to URL - Javascript

We are displaying reports in a PDF format through an aspx page.
I have put and URL link in an report as follows to open a new
window(cotaining another report)
="javascript:void(window.open('http://localhost/ReportViewer/ReportFrame.aspx?rptPath=REPORTPATH&args="
& REPORTARGS &
"','GraphDetail','left=50,top=50,width=800,height=580,menubar=no,resizable=yes,scrollbars=Yes,status=yes,toolbar=0'))"
When the report is displayed for the first time...the URL link works fine. I
get an security msg from adobe reader saying document is trying to open this
link ..asks to block or allow...when i click Allow ..the new window
opens(with the report). But when i close this new window and reclick the
link...it does not work.
I have been stuck in this for 4 days now...i am not getting what is the
issue...
The aspx page has frames...but i do not see any issue with that either...i
am tried with a simple aspx page...same issue...i have tried allowing
pop-ups ...etc
I think this is issue with adobe reader ..because if i display the report
in HTML format...the link works fine...opens every time i click it!!!!.
Has anyone has had any similar issues!!!!...
Can anyone help me ...all i want to do is...open a link in new window from
an deployed PDF report ...link is an aspx page with a new detail report.
Thanks.Hi,
my jump to link is similar and working.
my link is like this..
="javascript:" &
IIF(Fields!Acked.Value = 1,"void(0)",
"var sRS='" & Globals!ReportServerUrl &
"';void(window.open(sRS.substring(0,sRS.indexOf('/ReportServer')) +
'/rtreporting/acknowledge.aspx?FilterID=" & Fields!FILTERID.Value &
"&prmServer=" & Fields!SERVER.Value & "&prmStartDate=" &
Format(Parameters!prmDateFrom.Value,"yyyy-MM-dd HH:mm:ss") & "&prmEndDate=" &
Format(Parameters!prmDateTo.Value,"yyyy-MM-dd HH:mm:ss") & "','_blank'))")
can you use Globals!ReportServerUrl instead of localhost.
also try using _blank parameter and make it default size..
"Sunny" wrote:
> We are displaying reports in a PDF format through an aspx page.
> I have put and URL link in an report as follows to open a new
> window(cotaining another report)
> ="javascript:void(window.open('http://localhost/ReportViewer/ReportFrame.aspx?rptPath=REPORTPATH&args="
> & REPORTARGS &
> "','GraphDetail','left=50,top=50,width=800,height=580,menubar=no,resizable=yes,scrollbars=Yes,status=yes,toolbar=0'))"
>
> When the report is displayed for the first time...the URL link works fine. I
> get an security msg from adobe reader saying document is trying to open this
> link ..asks to block or allow...when i click Allow ..the new window
> opens(with the report). But when i close this new window and reclick the
> link...it does not work.
> I have been stuck in this for 4 days now...i am not getting what is the
> issue...
> The aspx page has frames...but i do not see any issue with that either...i
> am tried with a simple aspx page...same issue...i have tried allowing
> pop-ups ...etc
> I think this is issue with adobe reader ..because if i display the report
> in HTML format...the link works fine...opens every time i click it!!!!.
> Has anyone has had any similar issues!!!!...
> Can anyone help me ...all i want to do is...open a link in new window from
> an deployed PDF report ...link is an aspx page with a new detail report.
> Thanks.

No comments:

Post a Comment