Friday, March 9, 2012

Deploying RDL file Programatically

Hi,

I am able to create a rdl file programatically.I want to deploy the RDL file programatically in Report Server.Any help is appreciated.

Thanks,

Prabu

Hi Prabu,

I came across this link previously concerning about your question. It is writtent in c# though, so you might need some time to "translate" it to VB. Other than that, it will teach ya to do what you need to do.

http://www.codeproject.com/sqlrs/SQLReportDeploy.asp

Good luck !

|||

Hi,

Thanks for you help.

I am using web application.Using that I am creating an RDL file.And I want to deploy the RDL file using Web application not through console application.

The link is having the information to deploy using Windows/Console application.

Please help me in this Regard.

Thanks,

Prabu

|||

Hi Prabu

Actually the link i posted here should show you the basics on deploying the report

regardless of what application you are writing.

Look under the function deploy and you will see what i mean. YOu will definitely need to modify some parts so that it points to the webserver. that link will help to get the information you need about the datasource and then deploy it from there. Other than that, it should work for what you are doing.

Just take a bit of tracing. good luck

|||

Hi,

Fine.I tried that code.If anyone is having code sample in web application is really helpfull.

Urgent!

Thanks,

Prabu

|||

Hi,

You can use the RS.EXE for deploying your reports programmatically. You have to create a .RSS file [Reporting Services Script

file] and use the functions available to deploy your reports.

Vasant.

|||

Hi,

I tried and how to call a exe in web application.If anyone is having any Idea about to deploy Report using webservice in Web application ...

I tried a lot and I need it urgent.

Thanks,

Prabu

|||Which of the web application are you using, It might have the functionality to execute a command. The rs.exe file is located in the

c:\program Files\Microsoft SQL Server\90\BINN\

folder. There are various parameters to the rs command. Just for your knowledge see below. At the bottom you will see how rs.exe is used. Njoy!!

Syntax

rs {-?}
[-iinput_file=]
[-sserverURL]
{-uusername}
{-ppassword}
{-ltime_out}
{-bbatchmode}
{-vglobalvars=}
{-eendpoint}
{-ttrace}
Arguments
-?
(Optional) Displays the syntax of rs arguments.
-i input_file
(Required) Specifies the .rss file to execute. This value can be a relative or fully qualified path to the .rss file.
-s serverURL
(Required) Specifies the Web server name and report server virtual directory name to execute the file against. An example of a report server URL is http://examplewebserver/reportserver. The prefix http:// or https:// at the beginning of the server name is optional. If you omit the prefix, the report server script host attempts to use https first, and then uses http if https does not work.
-u [domain\]username
(Optional) Specifies a user account used to connect to the report server. If -u and -p are omitted, the current Windows user account is used.
-p password
(Required if -u is specified) Specifies the password to use with the -u argument. This value is case-sensitive.
-l time_out
(Optional) Specifies the number of seconds that elapse before the connection to the server times out. The default is 60 seconds. If you do not specify a time-out value, the default is used. A value of 0 specifies that the connection never times out.
-b
(Optional) Specifies that the commands in the script file run in a batch. If any commands fail, the batch is rolled back. Some commands cannot be batched, and those run as usual. Only exceptions that are thrown and are not handled within the script result in a rollback. If the script handles an exception and returns normally from Main, the batch is committed. If you omit this parameter, the commands run without creating a batch. For more information, see Batching Methods.
-e
(Optional) Specifies the SOAP endpoint against which the script should run. Valid values include: Exec2005, Mgmt2005, and Mgmt2000. If a value is not specified, the Mgmt2005 endpoint is used. Note that the Mgmt2000 value is deprecated in this release. For more information about the SOAP endpoints and deprecated features, see Report Server Web Service Endpoints and Deprecated Features in SQL Server 2005 Reporting Services.
-v globalvar
(Optional) Specifies global variables that are used in the script. If the script uses global variables, you must specify this argument. The value that you specify must be valid for global variable defined in the .rss file. You must specify one global variable for each –v argument.
The -v argument is specified on the command line and is used to set the value for a global variable that is defined in your script at run time. For example, if your script contains a variable named parentFolder, you can specify a name for that folder on the command line:
rs.exe -i myScriptFile.rss -s http://myServer/reportserver -v parentFolder="Financial Reports"
Global variables are created with the names given and set to the values supplied. For example, -v a="1" -v b="2" results in a variable named a with a value of "1" and a variable b with a value of "2".
Global variables are available to any function in the script. A backslash and quotation mark (\") is interpreted as a double quotation mark. The quotation marks are required only if the string contains a space. Variable names must be valid for Microsoft Visual Basic; they must start with alphabetic character or underscore and contain alphabetic characters, digits, or underscores. Reserved words cannot be used as variable names. For more information about using global variables, see Using Global Collections in Expressions (Reporting Services).
-t
(Optional) Outputs error messages to the trace log. This argument does not take a value. For more information, see Reporting Services Trace Logs.
Permissions
To run the tool, you must have permission to connect to the report server instance you are running the script against. You can run scripts to make changes to the local computer or a remote computer. To make changes to a report server installed on a remote computer, specify the remote computer in the -s argument.
Examples
The following example illustrates how to specify the script file that contains Visual Basic .NET script and Web service methods that you want to execute.

Copy Code

rs –i c:\scriptfiles\script_copycontent.rss -s http://localhost/reportserver

No comments:

Post a Comment