Downloading SSRS report from report server using C# code - c#

I have been working on a requirement to deploy and download SSRS reports programmatically from C# code.
I used the service exposed by SSRS (ReportingServices2010). I am able to deploy my reports from application server to report server successfully. I referred to "https://www.codeproject.com/Articles/43133/Deploying-Reports-in-Reporting-Services-Programmat" for this.
Meaning, the deployment portion is done and I am able to deploy the report using C# code. But now, I want a functionality to download reports from report server and place it to Application server somewhere. I want to achieve this in similar way, like I did for deploying (using C# code).
But I am unable to find any method exposed by service which can return content of the report deployed on report server.
As a work around I found a way to directly query on Report Server Database or Power shell script as well. But I would prefer a solution using C# code only.
Please suggest if we can download SSRS report from report server programmatically using C# code.
Thanks,
Ketan

You can look at the code for command Out-RsCatalogItem in ReportingServicesTools GitHub project to determine how to download using the SOAP Proxy. In order to create a Web Service Proxy in .NET, look at this page. If you are still not sure how to proceed, then leave a comment and I will try to hack up a quick sample.

Related

Phonegap and C# web service

a while back i made a C# Windows Forms which generates PDF report by using itextsharp.
Also, I made phonegap app that communicate with SQL Server that can DELETE, UPDATE and SELECT from database and it's working fine.
Now here is my question
How can I send data from Phonegap application to C# windows form, which run on the server side, to generate A PDF report?
This is what I found out so far and i'm not sure if i am going in the right direction
1.Re-write the code of C# Windows form to asp.net form
2.make a C# webservice which can receive data from phonegap and use asp.net to generate a PDF Report.
3.webservice should be at server side running 24/7
All I want is that "something" should be at the server side waiting for data, once it receives data it should make a pdf report out of it.
Thank you and I hope that was not confusing.
I just need to be pointed at the right direction.
Finally I found the answer i was looking for.
These are the main points I mentioned on my question:
I made C# Desktop app for generating PDF report using iTextsharp
I want a Phonegap app to generate PDF report by sending data to C# desktop application.
The answer simply is to make C# web service and consume this web service from phonegap. it took me some time but it's working perfectly.

Generate PDF reports from SQL Server reports.rdl C#

Let me start by asking for your patience as I am ignorant of SSRS and not so sharp on the WCF technology that I intend on using to perform the task I want.
I have a SQL Server Express instance with data I want to get daily reports out of. I can not schedule tasks on SQL Server (and the reports server I think I can in the full blown but not in Express) , but I can schedule via windows task.
So I am writing an application that will use predefined rdl's to generate my reports and send the reports back via email. I am not sure how rdl's data connection is set from my C# application - I created rdl's in its own project, but it looks like I need to do rdlc conversions for my application.
What I would like to do is query the database via the reports and then send those reports out in an email to a set group of recipients (pulled from their email field in the users=reports result table.
[FYI] I also have a web application that might need to generate these same reports.
Now on to my question:
I am not sure if I even need WCF to do anything here, as it looks like from this post Creating a PDF from RDLC report that I can simply run that code and point to my data source and the bytes will be returned to me (so far fine for a desktop quick and dirty getter - I think)
Now is the same functionality possible in a web application - it would be nice to reuse the same code.
Can some one provide me with some proper guidance for this kind of functionality with the technologies involved - so I can code something proper and maintain KISS principle.

Is there a way to check, from C#, if SSRS Reporting Server is running?

I am trying to check whether a SSRS Report Server is running before I generate the reports for my website. I am trying to stay away from using a try catch in this situation.
There are two modes to deploy a SSRS report.
One is through sharepoint and one is through native.
If you're NOT deployed through sharepoint, you could check if a SSRS server is running by sending an http request and examining the response.
I got this information from : https://msdn.microsoft.com/en-us/library/ms143773.aspx#bkmk_nativemode
and
https://msdn.microsoft.com/en-us/library/ms178811.aspx

Crystal Report Runtime software from server in C#

advanced hello to all
I made an application in C# , in that app I have some report created with crystal report
is there any way to running this report without installation crystal runtime in clients machine
maybe using crystal report that installed on server ?
thanks
farzad
If you know when and who will need the report you can use a scheduler. There are few vendors who produce schedulers for Crystal reports. The way how it works is : You will choose the report, the parameters , the export type (PDF, Excel, Word, HTML etc.) and the time when the report should be started. The scheduler will run the report, export it and deliver it. Depending on the scheduler you might be able to deliver the exported files to a network drive , e-mail address, SharePoint etc. Her is a link to an article comparing different schedulers:
http://kenhamady.com/cru/comparisons/desktop-scheduling-engines
I don't think there is no way to run a Crystal Report on a computer without installing the client components locally. You could, however, develop a service running on the server machine, which takes a report from a client, renders it to PDF (for example) and sends the results back for displaying on the client. This wouldn't be a simple task though, since you might also have to consider further input from the client (like report parameters, which you can't even determine at runtime without the client components) and have to implement communication over the network.
Otherwise, maybe you are more interested in a web-based approach and need Crystal Reports Server?

Accessing SQL Reports server when url is only accessible by first using RDP

I have a client that needs me to set up a website that pulls sql reports from a separate server. Currently the only way to access the url to the reports server is to first rdp into that server. I tried creating a web services proxy class, but the url was unable to resolve due to the added protection.
Is there any way for me to pull the reports in my asp.net application from the other server without removing the rdp? This is my first time trying this, so im not sure if i am going about this the correct way or if it is even possible to access that server from the client web application with the rdp in place.
EDIT
All my application needs to do is display pre-made reports to specific clients/groups based on their login credentials. These clients/groups will not be creating or altering reports(at least not at this point in time).
I think you'll find its most likely not possible or probably very hard to do.
Perhaps you could obtain a copy of the database through replication or maybe a nightly bulk update and run the report against that, perhaps you could script a machine to remote desktop in and share the drives on it and get it to backup the db or similar.
In any case if you can't get a copy of the database I don't think you could feasibly generate any kind of report that allows user input to generate it.
EDIT:
It looks like this answer will get you started in connecting and triggering a file copy

Categories

Resources