Friday, March 23, 2012

Open URL in New Browser

My report has a table that when I click on a cell it jumps to URL and open
it in the same browser window. How to open the URL in a new browser instead
of current browser window?
Thanks.You didn't ask about Excel but this response of mine to another post will
answer you question:
Depending on how you design your reports you can do the following to export
to Excel. Or, what I do sometimes is make a copy of the report and clean it
up for data export and then hide it in list view. If you export from Report
Manager it puts CSV data in unicode which Excel puts all in one column. If
you export in ASCII then Excel does just as you want. To prevent a problem
with cells (Excel will object to sorting the data) you need to remove any
textboxes you have (for instance with a title, showing the parameters run
etc) and instead add additional header rows, merge the cells and put your
text in there instead. I add a link at the top of the report that says
Export Data. With RS 2005 you will be able to configure it to use ASCII
instead of Unicode.
Here 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'))"
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"ME" <ME@.mail.com> wrote in message
news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
> My report has a table that when I click on a cell it jumps to URL and open
> it in the same browser window. How to open the URL in a new browser
> instead of current browser window?
> Thanks.
>|||Bruce,
The report I am viewing is in SQL 2000. I replaced your example with my
server name and parameter, it didn't work.
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:e38AxLT%23GHA.4268@.TK2MSFTNGP02.phx.gbl...
> You didn't ask about Excel but this response of mine to another post will
> answer you question:
> Depending on how you design your reports you can do the following to
> export to Excel. Or, what I do sometimes is make a copy of the report and
> clean it up for data export and then hide it in list view. If you export
> from Report Manager it puts CSV data in unicode which Excel puts all in
> one column. If you export in ASCII then Excel does just as you want. To
> prevent a problem with cells (Excel will object to sorting the data) you
> need to remove any textboxes you have (for instance with a title, showing
> the parameters run etc) and instead add additional header rows, merge the
> cells and put your text in there instead. I add a link at the top of the
> report that says Export Data. With RS 2005 you will be able to configure
> it to use ASCII instead of Unicode.
> Here 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'))"
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "ME" <ME@.mail.com> wrote in message
> news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
>> My report has a table that when I click on a cell it jumps to URL and
>> open it in the same browser window. How to open the URL in a new browser
>> instead of current browser window?
>> Thanks.
>|||Use exactly what I have. Do not put in your server name. Replace just the
folder, report and parameters.
Even better, do a test with a report that is without parameters so you know
that is not a problem.
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/SomeFolder/SomeReport&ParamName=" &
Parameters!ParamName.Value','_blank'))"
One last point, you cannot test this in the development environment, you
have to deploy it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"ME" <ME@.mail.com> wrote in message
news:O66gRCU%23GHA.3860@.TK2MSFTNGP02.phx.gbl...
> Bruce,
> The report I am viewing is in SQL 2000. I replaced your example with my
> server name and parameter, it didn't work.
>
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
> news:e38AxLT%23GHA.4268@.TK2MSFTNGP02.phx.gbl...
>> You didn't ask about Excel but this response of mine to another post will
>> answer you question:
>> Depending on how you design your reports you can do the following to
>> export to Excel. Or, what I do sometimes is make a copy of the report and
>> clean it up for data export and then hide it in list view. If you export
>> from Report Manager it puts CSV data in unicode which Excel puts all in
>> one column. If you export in ASCII then Excel does just as you want. To
>> prevent a problem with cells (Excel will object to sorting the data) you
>> need to remove any textboxes you have (for instance with a title, showing
>> the parameters run etc) and instead add additional header rows, merge the
>> cells and put your text in there instead. I add a link at the top of the
>> report that says Export Data. With RS 2005 you will be able to configure
>> it to use ASCII instead of Unicode.
>> Here 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'))"
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "ME" <ME@.mail.com> wrote in message
>> news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
>> My report has a table that when I click on a cell it jumps to URL and
>> open it in the same browser window. How to open the URL in a new
>> browser instead of current browser window?
>> Thanks.
>>
>|||It worked finally. Thanks
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
news:eXGqvGU%23GHA.3456@.TK2MSFTNGP02.phx.gbl...
> Use exactly what I have. Do not put in your server name. Replace just the
> folder, report and parameters.
> Even better, do a test with a report that is without parameters so you
> know that is not a problem.
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/SomeFolder/SomeReport&ParamName=" &
> Parameters!ParamName.Value','_blank'))"
> One last point, you cannot test this in the development environment, you
> have to deploy it.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "ME" <ME@.mail.com> wrote in message
> news:O66gRCU%23GHA.3860@.TK2MSFTNGP02.phx.gbl...
>> Bruce,
>> The report I am viewing is in SQL 2000. I replaced your example with my
>> server name and parameter, it didn't work.
>>
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> wrote in message
>> news:e38AxLT%23GHA.4268@.TK2MSFTNGP02.phx.gbl...
>> You didn't ask about Excel but this response of mine to another post
>> will answer you question:
>> Depending on how you design your reports you can do the following to
>> export to Excel. Or, what I do sometimes is make a copy of the report
>> and clean it up for data export and then hide it in list view. If you
>> export from Report Manager it puts CSV data in unicode which Excel puts
>> all in one column. If you export in ASCII then Excel does just as you
>> want. To prevent a problem with cells (Excel will object to sorting the
>> data) you need to remove any textboxes you have (for instance with a
>> title, showing the parameters run etc) and instead add additional header
>> rows, merge the cells and put your text in there instead. I add a link
>> at the top of the report that says Export Data. With RS 2005 you will be
>> able to configure it to use ASCII instead of Unicode.
>> Here 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'))"
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "ME" <ME@.mail.com> wrote in message
>> news:OPWXUKT%23GHA.2408@.TK2MSFTNGP05.phx.gbl...
>> My report has a table that when I click on a cell it jumps to URL and
>> open it in the same browser window. How to open the URL in a new
>> browser instead of current browser window?
>> Thanks.
>>
>>
>

No comments:

Post a Comment