Using vb.net, does anyone know or has anyone fired off a sql report, save it as PDF to a defined path?
I am knew to sql reporting services and the help files are not very helpfile.
Any sample code would be helpful.
Thanks
Hello,
Have a look at the sample code on this page:
http://msdn2.microsoft.com/en-us/library/microsoft.wssux.reportingserviceswebservice.rsexecutionservice2005.reportexecutionservice.render.aspx
Specify the export format you want (in your case "PDF") as a parameter to the Render method.
-Chris
|||I looked at the sample code, how ever, not sure where the references are to things like
"ReportExecutionService" and some of the other objects.
WHich .net items do I need to import?
Daryl
|||In your project you need add a web reference to the reportexecution service. this will create a proxy class that you an instantiate in code to call the web service|||does it matter that I am NOT building a web application? Building a Desktop vb.net exe.|||no it doesn't matter|||I cannot find this reference. I looked in windows and system...
|||Right-click your project and select "Add Web Reference"|||Hi Adam,
The post and the replies are really useful. Thanks a lot for the help...
Adam, the URL "http://localhost/reportserver/reportexecution2005.asmx" needs to be a working one or are we giving a dummy value?
Thanks in advance for the help....
Sudhiiiii...
|||Replace "localhost" with the name of your reports server.|||Hi,
First of all thanks for the reply.
I tried the above stated method and the URL for my system was "http://localhost/reportserver$sqlserver/reportexecution2005.asmx".
As i'm developing a Windows application solution, i hasn't deployed any of my reports in the specified URL or any other.
I tried to add the URL as a Web reference its saying the URL doesnot contain any web service.
I tried to browse the URL manually, its saying that there is an authentication problem, and user "systemname\ASPNet" is unable to connect to the Database.I went to Sql server and given all the rights to 'aspnet" user , which was a normal user previously.In IIS i tried giving anonyous rights as well as windows integrated user for the virtual directory .My DB is having full rights, and working on integrated user while using the forms.
still the problem persists.
1) is the problem in SQL server or IIS or windows...?
2)Does this has any relation to 'ASP.Net state service' service in windows
3) will me publishing the reorts in iis server will solve the issue. I should have tried this but i'm a too newbie in this and i need to search for how to do that...
Please do help...... Thanks in advance......
Sudhiiii....
|||Sudeesh,
If you are developing a windows application then you should use the ReportViewer control. This can be used in one of 2 modes:
local mode: the report files are saved as RDLC and stored in the application directory (no report server required)
server mode: where the control connects to a report server and displays shared reports. For this reports need to deployed tot he server.
|||Hi Adam,
Thanks a lot for the reply...
I should have told my problem in detail...
Let me do that now..
I'm creating a windows application With Vb2005 and Sql 2005 express editions.
The basic point is to create 5 reports from the data in sql tables, each one having several subreports. These reports have to be exported to Excel as there was a VBA application on Excel previously.Currently I'm able to manually save each report as an individual file and later open five excel files move/copy them into one file and then save the excel.I want to automate the task using code such that for the end user it should be like, one button pressed and five reports are saved to excel file... The issue is that i'm able to save at least a report to an excel file manually only, not using code.
Once i'm able to save one report by code we can bundle all of them into one workbook.
To view the report I'm using Reportviewer control but i'm not able to save it.
I hope i made it clear....
Sudhiiiii...
sql
No comments:
Post a Comment