Wednesday, March 28, 2012
How to validate report server URL?
My application is using reporting services reports. This application has
got some settings where service URL and report folder names are stored. My
requirement is to validate report server URL.
E.g. rptURL = http://REPORTBOX/REPORTSERVER.
where REPORTBOX is the machine name.
Here I want to validate whether rptURL is valid or not.
How do I do that from c# code?
thanks,
DeeeYou can just create an instance of the webservice object, authenticate by
setting the Credentials property, and call a method. Wrap everything in a
try/catch.
--
Adrian M.
MCP
"Deee" <Deee@.discussions.microsoft.com> wrote in message
news:691D0A2C-A3A8-4961-B5DB-4A903FD6FA14@.microsoft.com...
> Hi,
> My application is using reporting services reports. This application has
> got some settings where service URL and report folder names are stored.
> My
> requirement is to validate report server URL.
> E.g. rptURL = http://REPORTBOX/REPORTSERVER.
> where REPORTBOX is the machine name.
> Here I want to validate whether rptURL is valid or not.
> How do I do that from c# code?
> thanks,
> Deeesql
How to use VB.NET to open an SSRS report ?
Hi all,
I was wondering whether I should just use the URL posting in aspx as below :-
Code Snippet
Response.Redirect("http://Reportserver/virtualfolder/Deployedfoldername/Reportname¶metername=parametervalue")
or Should i just put this in the asp page ?
Code Snippet
<asp:HyperLink ID="HL1" runat="server" Target="_blank" NavigateUrl=http://Reportserver/virtualfolder/Deployedfoldername/Reportname¶metername=parametervalue">Click on Report</asp:HyperLink></div>
I can't really test this out at the moment till i get a go ahead from the IT Department that SSRS is up and running and i can deploy the reports.
I was wondering what would the effects be for each code in their respective pages ?
Would the aspx be able to pop up the report page in a new window automatically ? OR the second piece of code is a better way of doing it ?
Sincerely,
Bernard
these are two different mehtods, the first one will redirect the page making the window to shop up the report in the same window, the hyperlink option would display the report in a new (_blank) window. this would not happen automatically, the user will have to click on the link where in the first case he will be automatically redirected to the reporting services report.
Jens K. Suessmeyer
http://www.sqlserver2005.de
|||
Hi Jens,
Thanks for the reply.
Well the first one will be in an event click, so the user would have to click on the link for it to open the report.
I forgot to put the sub around it.
another question relating to this, is the passing of parameters. I am going to be using Session variables in the application, and am beginning to wonder whether
I should use the Sub code. I know that I can do this in ASP (html/javascript) but I feel that it is easier to work with sessions in ASPX.
I found an interesting article which says that I can achieve the opening a new window on a click by doing this in the sub.
Code Snippet
Response.Write("<script>window.open('http://Reportserver/virtualfolder/Deployedfoldername/Reportname¶metername=' & Session("value"),'_blank');</script>")
I am not sure whether this is considered as a pop-upwindow or a new window. Can somebody shed some light on this ? Thanks.
Bernard
|||I would alway try to use pre HTML Code, rendering the information for the link in the first request. This pure client side action will allow you to avoid a second roundtrip. The solution you mentioned with the window.open function in Jscript would probably cause some browsers to block the popup window. So try to render out the a href code, this is (for me) more straight forward.Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||
Jens K. Suessmeyer wrote:
I would alway try to use pre HTML Code, rendering the information for the link in the first request. This pure client side action will allow you to avoid a second roundtrip. The solution you mentioned with the window.open function in Jscript would probably cause some browsers to block the popup window. So try to render out the a href code, this is (for me) more straight forward. Jens K. Suessmeyer.
http://www.sqlserver2005.de
HI jens,
Thanks for the reply !
That's what i was afraid of, pop up blocking. At least now i know that the window.open won't work correctly. Thanks !
So basically, All i need to do is put a hyperlink tag in the html, and then specified which report is going to show up in the "href" and then "target=_Blank" right ?
And then somehow use or try to use a session variable in the html code ?
Thanks
Bernard
|||Hi,compose the URL within your code, like HL1.NavigateUrl = "http://someserver/SomeHtml.aspx?SomeVar=" & Session["Something"].ToString();
Jens K. Suessmeyer.
http://www.sqlserver2005.de
|||
Hi Jens,
Thanks for the reply!
Yeah should have thought about doing that ! Thanks ! Don't know why i was trying to give my self alot of headache trying to do it in html instead. lol.
Really appreciate this !
Bernard
Sunday, February 19, 2012
How to use "TARGET" in "Jump to URL"
If it's possible how to do? Can show me any example code?
Cause I want the new report is open on the other frame not a new window.
Thanks for any help!
AngiThis might do what you want:
This 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'))"
You have to have SP1 or greater installed.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"angi" <angi@.news.microsoft.com> wrote in message
news:e1oVn0uTGHA.5264@.TK2MSFTNGP10.phx.gbl...
> Is it possible to include HTML element "Target" in "Jump to URL"?
> If it's possible how to do? Can show me any example code?
> Cause I want the new report is open on the other frame not a new window.
> Thanks for any help!
> Angi
>|||Thanks for Bruce!
I knew this function and work well.
But I don't want to open the data in a separate window,
I want it opens in another frame on Homepage.
This is my code:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/MOJBIS/MojBisLv2-Bu01Sc','_main'))"
'_main' is the frame's name.
The HTML Code as follow:
<frameset rows="64,*">
<frame name="Horizon" scrolling="no" noresize target="contents"
src="tframe.aspx">
<frameset cols="449,*">
<frame name="contents" target="main" src="http://pics.10026.com/?src=lframe.aspx">
<frame name="main" src="http://pics.10026.com/?src=rframe.aspx">
</frameset>
<noframes>
<body>
</body>
</noframes>
</frameset>
So, I want the report open on "rframe.aspx", and the frame name = "main".
Have any idea?
Thanks for help!
Angi
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:eHiQ1$1TGHA.3192@.TK2MSFTNGP09.phx.gbl...
> This might do what you want:
> This 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'))"
> You have to have SP1 or greater installed.
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
> "angi" <angi@.news.microsoft.com> wrote in message
> news:e1oVn0uTGHA.5264@.TK2MSFTNGP10.phx.gbl...
>> Is it possible to include HTML element "Target" in "Jump to URL"?
>> If it's possible how to do? Can show me any example code?
>> Cause I want the new report is open on the other frame not a new window.
>> Thanks for any help!
>> Angi
>|||I haven't done this. My guess would have been to put the frame name instead
of _blank. You tried _main, how about putting the work main with no
underscore?
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"angi" <angi@.news.microsoft.com> wrote in message
news:u8OGJqYUGHA.4864@.TK2MSFTNGP12.phx.gbl...
> Thanks for Bruce!
> I knew this function and work well.
> But I don't want to open the data in a separate window,
> I want it opens in another frame on Homepage.
> This is my code:
> ="javascript:void(window.open('" & Globals!ReportServerUrl &
> "?/MOJBIS/MojBisLv2-Bu01Sc','_main'))"
> '_main' is the frame's name.
> The HTML Code as follow:
> <frameset rows="64,*">
> <frame name="Horizon" scrolling="no" noresize target="contents"
> src="http://pics.10026.com/?src=tframe.aspx">
> <frameset cols="449,*">
> <frame name="contents" target="main" src="http://pics.10026.com/?src=lframe.aspx">
> <frame name="main" src="http://pics.10026.com/?src=rframe.aspx">
> </frameset>
> <noframes>
> <body>
> </body>
> </noframes>
> </frameset>
> So, I want the report open on "rframe.aspx", and the frame name = "main".
> Have any idea?
> Thanks for help!
> Angi
> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com>
> ¼¶¼g©ó¶l¥ó·s»D:eHiQ1$1TGHA.3192@.TK2MSFTNGP09.phx.gbl...
>> This might do what you want:
>> This 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'))"
>> You have to have SP1 or greater installed.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "angi" <angi@.news.microsoft.com> wrote in message
>> news:e1oVn0uTGHA.5264@.TK2MSFTNGP10.phx.gbl...
>> Is it possible to include HTML element "Target" in "Jump to URL"?
>> If it's possible how to do? Can show me any example code?
>> Cause I want the new report is open on the other frame not a new window.
>> Thanks for any help!
>> Angi
>>
>|||Hi, Bruce,
Thank you very much.
I've done this, the code as follow...
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?/MOJBIS/MojBisLv2-Bu01Sc','main'))"
Using underscore will open the new window!
Last, for "window.open" function there is a reference:
http://www.w3schools.com/htmldom/met_win_open.asp
Thanks again!
Angi
"Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:%23CSU32aUGHA.776@.TK2MSFTNGP09.phx.gbl...
>I haven't done this. My guess would have been to put the frame name instead
>of _blank. You tried _main, how about putting the work main with no
>underscore?
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "angi" <angi@.news.microsoft.com> wrote in message
> news:u8OGJqYUGHA.4864@.TK2MSFTNGP12.phx.gbl...
>> Thanks for Bruce!
>> I knew this function and work well.
>> But I don't want to open the data in a separate window,
>> I want it opens in another frame on Homepage.
>> This is my code:
>> ="javascript:void(window.open('" & Globals!ReportServerUrl &
>> "?/MOJBIS/MojBisLv2-Bu01Sc','_main'))"
>> '_main' is the frame's name.
>> The HTML Code as follow:
>> <frameset rows="64,*">
>> <frame name="Horizon" scrolling="no" noresize target="contents"
>> src="http://pics.10026.com/?src=tframe.aspx">
>> <frameset cols="449,*">
>> <frame name="contents" target="main" src="http://pics.10026.com/?src=lframe.aspx">
>> <frame name="main" src="http://pics.10026.com/?src=rframe.aspx">
>> </frameset>
>> <noframes>
>> <body>
>> </body>
>> </noframes>
>> </frameset>
>> So, I want the report open on "rframe.aspx", and the frame name = "main".
>> Have any idea?
>> Thanks for help!
>> Angi
>> "Bruce L-C [MVP]" <bruce_lcNOSPAM@.hotmail.com> ¼¶¼g©ó¶l¥ó·s»D:eHiQ1$1TGHA.3192@.TK2MSFTNGP09.phx.gbl...
>> This might do what you want:
>> This 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'))"
>> You have to have SP1 or greater installed.
>>
>> --
>> Bruce Loehle-Conger
>> MVP SQL Server Reporting Services
>> "angi" <angi@.news.microsoft.com> wrote in message
>> news:e1oVn0uTGHA.5264@.TK2MSFTNGP10.phx.gbl...
>> Is it possible to include HTML element "Target" in "Jump to URL"?
>> If it's possible how to do? Can show me any example code?
>> Cause I want the new report is open on the other frame not a new
>> window.
>> Thanks for any help!
>> Angi
>>
>>
>