Learn SSRS SOAP API in C# language - sql

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

Related

IT-Hit WebDAV Library: passing Access-Token from webapp through WebDAV-Client to webDAV-Server possible?

I am currently working on a POC and made quite a lot of progress thanks to IT-Hit WebDAV Library.
However, I am currently stuck at the authentication. I am using the "OnBeforeRequestSend"-Hook to add my authentication header containing my current access-token. This approach works very well for all the request coming from my webapp.
Nevertheless, the problem I am facing right now is, that I lose the authentication-token for every request from the webdav-client...
In order to tell the webdav-client apart from any other website, I thought about using the User-Agent-Header to determine what behavior the server is going to exhibit.
To be exact: I thought about only checking the token when the user-agent is not "Microsoft Office ...".
Since this solution seems very error prone, I wanted to ask If there is another way to pass the authentication-header from my webapp through the webdav-client to the webdav-server, so that i can validate/verify every request to webdav-server independently of the source (webapp or webdav-client)?
My current stack is:
WebApp written in TypeScript
WebDAV-Server written in .Net
thanks and best regards,
greenbird
Look into implementing MS-OFBA, this will work as you desire.

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.

Pass query string to Page Viewer Web Part

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

Programmatically accessing a Sharepoint list at runtime (without creating a service reference at design time)

I'm creating an app that will be configurable by the end-user to access SharePoint lists, on various different SharePoint sites, that are entered by the user.
All of the examples for reading SharePoint lists I've come across online are of the form:
Open or create a Visual Studio
project.
In Solution Explorer,
right-click the References node, and
then click Add Service Reference.
In the Address box, type the URL to
the target site and append
/_vti_bin/ListData.svc. For example,
the address for the site
intranet.wingtip.com would be
http://intranet.wingtip.com/_vti_bin/ListData.svc.
Change the default name in the
Namespace box from ServiceReference1
to something more appropriate, such
as WingtipSite.
etc, etc, etc
This method creates proxy classes within your project based on the specified server reference. However, in my case, the server/site is not known at design time, only runtime by reading the sites/lists specified by the user. How would one go about doing that (reading the list via http://intranet.wingtip.com/_vti_bin/ListData.svc, but at runtime only)?
Note: I am making this call from a different machine than the one running Sharepoint.
There are a couple answers.
If the lists schemas will be consistent across all the sites you are querying, you can still use the generated proxy. When you create the DataContext, you just need to pass in the URI to the ListData.svc for the site chosen by the user.
If not, then you can use an ASP.NET WebRequest with an appropriately formatted URI and parse out the ATOM or JSON response that comes back.
For more information on using the REST APIs, check out this talk from the 2009 SharePoint Conference
http://msdn.microsoft.com/en-us/sharepoint/ff462048
You can set the URL in your proxy class at runtime with the Url property.
SharePoint does not provide a proxy class for their web services. Therefore it's not possible to set the url at runtime. WHat I have had to do is add 2 service references and then paramaterize which one I will access. I use a config setting to determine which one to access. If the site name changes or list changes, then I need to remove the references, re-add them, recompile and redeploy. There is no way to change the SharePoint site/list at runtime. Have been searching for 3 days for an answer. Microsoft does not know how to accomplish this.

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