Pass query string to Page Viewer Web Part - sharepoint-2010

I have a share point page, in which I have added a page viewer web part. This web part needs to be supplied with a query string in addition with the static URL.
I tried putting a QueryString Filter Web Part but it did let me connect with the page viewer web part(Message - the connection type send parameter values is not compatible with any web part on the page)
I was wondering whats the correct way to achieve this. Thanks

I got going...
The solution is to create your own visual web part. Visual web part is not but a user control which a web part loads in in CreateChildControl method.
Now you have access to code behind, Sharepoint Context, you can do what ever you want.
How to create Visual Web Part

Related

Learn SSRS SOAP API in C# language

Where do I start learning SOAP API based on C# for Reporting Service ? MSDN articles are difficult for me to understand and ended up making me confused. In fact, they are like giving more facts. I want to get my hands dirty on coding. But I don't know where could I start. What I want to do is I want my RDL reports/or RDLC reports to get accessed by users over the web. Please give me some guide.
P.S My coding skill is not very good ,but I want to learn more and practise more to improve it. Currently I am using SQL 2012 and VISUAL STUDIO 2012.
Thanks.
For me the easiest way was to start with generated proxy class. I did that using this MSDN article. Follow the section named "Adding the Proxy Using the WSDL Tool". According to it, first generate proxy class running this in command prompt (you may need to use VS dev command prompt to run wsdl.exe):
wsdl /language:CS /n:"Microsoft.SqlServer.ReportingServices2010" http://<Server Name>/reportserver/reportservice2010.asmx?wsdl
You will get ReportingServices2010.cs file, which you can include in your projects and use to connect to SSRS server.
var service = new ReportingService2010(){
Url = "http://<your server>/reportserver/reportservice2010.asmx" // url to your server
};
Then you can code anything you want according to MSDN documentation on this reporting service.
Let me know if this helped you.
I don't know if you made progress since your post (I hope so), but in my case I use the SOAP web service, without created proxy server by hands. VS will do the job.
This MSDN article and related links explain it.
The principle is the following : access the SOAP web service through an URL that looks like that : http://server/reportserver/ReportService2010.asmx?wsdl
where "server" is your domain name server, or IP address
and "reportserver" the access point of your SSRS server (it can be different in function of your installation settings).
After, in your VS, go in "Project" menu and choose "Add a service reference". Then enter the URL of your SSRS SOAP service (as explained before) and that's it !
It will create a new folder in your project called "Web Reference" with a item inside, directly linked to yout web service.
Then you can us it like any other object of .NET Framework (by creating ReportingService2010 for example like done in previous post).
Let me know if you have any other questions.
Regards

SSRS - How can I link to a deployed report that uses a reportviewer? How do I get the url to link to report?

Can you please advise me of where I can locate reportviewer url's like the following example...
<a href="http://<Server>/ReportServer/Pages/ReportViewer.aspx?%2fMyApp%2fCustom+Reports%2fMyReport&rs:Command=Render"
The situation is, I want to deploy a report but after I deploy it to the server where will I get the url or how can I construct it so that I can point my application to the correct report.
I have been trying to track down some previously deployed reports to see if I can work out the url but I cannot find anything.
That report isn't using the nice "Report Manager" web interface, it is effectively a back-end method for accessing the reports. It is mostly used for programmatically accessing reports via URL generation for parameters and other things.
For more information about the syntax of the URL parameters and how to use them see the following MSDN pages:
URL Access (SSRS)
URL Access Parameter Reference
Pass a Report Parameter Within a URL
If you're just trying to view reports online you might want to use http://server/Reports/ which will load the proper Report Manager interface which is how you would normally manage and view deployed reports.

scraping dynamic content

I am working on a web scraping project. do any body have idea of scraping dynamic content.
Dynamic content on base of query string is similar to static content but dynamic content based on some event of a control within same page is the point where i am stuck. because in this case page url remain same.
I am using C#.
Thanks in advance
Your question is rather general.
I'm not sure what you mean by event of a control, but as long as a browser generates http request you can catch it using tools like Firebug for Firefox or tools built in Google Chrome and see what is actually being sent to the server. So called AJAX requests are nothing else than standard http requests, it's just that web page is not reloaded as a whole.
Based on that information and page source it is possible to figure out how to create range of reguests that would simulate user interaction with dynamic elements on the page.

Retrieving dynamic text from a website in vb.net (VS2008)

I want to be able to retrieve dynamic data from a web page (share prices). I started out by retrieving the html code before I realised that as it is live data, the html code will be of little use. Although I am looking to capture specific data, all i wish to do is process a webpage that I specify which will return the text off that website and not the HTML code. Basically a copy and paste of the entire page would be great..
Any ideas would be really appreciated!
'Screen Scraping' by parsing HTML is so early 2000s...what I would do is read up on Amazon's Mechnical Turk. You can develop a queued architecture where you submit urls to this Mechnical Turk service. The service would automatically distribute these bits of work to users who would then do the dirty task of copying and pasting out the valuable stock quote information you require. Users around the world would anxiously await delivery of the next URL to their Mechanical Turk inbox...pinning for the opportunity to copy/paste out another share price for your application. Sure, it might take a few minutes to update your prices, but hey, they would be HAND parsed by REAL people around the globe! Just think of the possibilities!
Well, the HTML contains the text of the website, so you "just" need to parse the HTML.
EDIT: If the data is not in the HTML but loaded dynamically, the situation is different. As I can see, you have two options:
Find out how the data is loaded (i.e. read the JavaScript on the page). If it is updated via some web service, you could query the same web service in your program.
Use a web browser to get the data and then get the dynamic HTML tree of the page. Maybe the WPF Webbrowser control can help you with this, but I'm not sure since I've never done this myself.
Is it possible to find this same data provided in a ready-to-consume format rather than scraping HTML for it? It seems like there's probably public web-services for stock quotes.
For example: A quick search for "Stock price webservice" turned up http://www.webservicex.net/stockquote.asmx; an ASMX web-service that is easy to consume in .NET.
In your Visual Studio project you should be add a reference to this service via the "Add Web Reference" command; the dialog you're given varies depending on whether your project is targeting for .NET 2.0 or .NET 3.0/3.5.
I added a reference to the service named StockPriceProxy:
Public Function GetQuote(ByVal symbol As String) As String
Using quoteService As New StockPriceProxy.StockQuote
return quoteService.GetQuote(symbol)
End Using
End Function

Accessing http query string in a xaml file

If an HTTP request is made to an asp web page, then the asp code can access the query string via the Request.QueryString object.
What's the analagous way to do this in XAML? For example, say that I wanted to write a simple XAML page that just echoes the query string back in the response. What would the code for this look like?
Since you mention query strings and responses, I'm assuming you're talking about XBAPs (ie WPF applications hosted in the browser).
Check out this blog post:
How can I pass Querystring parameters to my WPF XBAP Application?
Once you've got the ApplicationDeployment.CurrentDeployment.ActivationUri value as a string it should be fairly trivial to pump it into a TextBlock on a page. Heck, you may be able to bind directly to it if you wanted to go that far.