Example of using SSRS SOAP API

This example uses adventure works sample  database and reports, please refer to books on line for setup instructions.

1.       Open Visual Studio and create a console application (VB or C#)

2.       Replace the code in Module.vb or Module.cs with the appropriate code snippet

a.       C#

using System;

using SoapAPI.ReportService2005;

 

class Module1

{

 

         public void Main()

         {

                 ReportingService2005 rs = new ReportingService2005();

                 rs.Credentials = System.Net.CredentialCache.DefaultCredentials;

 

                 rs.Url = "http://Localhost/reportserver/reportservice2005.asmx";

 

                 Property name = new Property();

                 name.Name = "Name";

 

                 Property description = new Property();

                 description.Name = "Description";

 

                 Property[] properties = new Property[2];

                 properties(0) = name;

                 properties(1) = description;

                 try {

                          Property[] returnProperties = rs.GetProperties("/AdventureWorks Sample Reports/Company Sales", properties);

                          Property p;

                          foreach ( p in returnProperties) {

                                   Console.WriteLine((p.Name + ": " + p.Value));

                          }

                 }

 

                 catch (Exception e) {

                          Console.WriteLine(e.Message);

                 }

                 finally {

                          Console.ReadLine();

                 }

         }

 

}

b.      VB

Imports System

Imports SoapAPI.ReportService2005

 

Module Module1

 

    Sub Main()

        Dim rs As New ReportingService2005

        rs.Credentials = System.Net.CredentialCache.DefaultCredentials

 

        rs.Url = "http://Localhost/reportserver/reportservice2005.asmx"

 

        Dim name As New [Property]

        name.Name = "Name"

 

        Dim description As New [Property]

        description.Name = "Description"

 

        Dim properties(1) As [Property]

        properties(0) = name

        properties(1) = description

        Try

            Dim returnProperties As [Property]() = rs.GetProperties("/AdventureWorks Sample Reports/Company Sales", properties)

            Dim p As [Property]

            For Each p In returnProperties

                Console.WriteLine((p.Name + ": " + p.Value))

            Next p

 

        Catch e As Exception

            Console.WriteLine(e.Message)

        Finally

            Console.ReadLine()

        End Try

    End Sub

 

End Module

3.       Run the application

Comments

# 素敵な1日のはじまり!
Left by masao on 9/15/2008 6:48 AM
# 恋人探しに
Gravatar 結婚情報
恋人
恋人募集
出会い募集
メル友
出会い系
熟女
出会い系サイト
出会い系
出会い
出会い
ギャルセフレ
ギャル出会い
恋人出会い
ご近所出会い
熟女セフレ
熟女出会い
セフレ
セフレ出会い
出会い
出会い系
出会い系
人妻
人妻セフレ
人妻出会い
不倫セフレ
メル友出会い
割り切りセフレ
恋人
結婚情報
無料出会い
無料出会い系
無料出会い系
無料出会い系サイト
金儲け
ギャンブル
不労所得
情報商材
ネットビジネス
楽して稼ぐ
恋愛
無料出会い系サイト
完全無料出会い系サイトを探したり
セフレ探しってどうやればいいの?って方に教えます!
セフレ募集のための出会い系サイトや
恋愛掲示板を利用するのは上手な方法ですよね!
恋愛から結婚に発展しちゃうかも・・・☆また
逆援助
逆援を真剣にお考えの方には
出会い掲示板のご利用をオススメします。
恋人募集サイトに本当の愛を探しにいこう!
恋愛掲示板も同じく恋人GETの確立高し。
逆援助も今の時代
完全無料出会い系で簡単に見つかるようになりました。
割切り出会いは難しい?いいえ!
即会いは十分に可能です!!その秘密は
出会い系サイト比較サイトを利用しているからです。
サポ掲示板も有効です。
無料出会い系検索で簡単に
メル友募集ができる!
メル友出会いも即日可能です!!
出会い系サイト
出会い探し
チャット
携帯チャット
完全無料出会い系サイト
無料出会い系サイト
無料出会い系サイト
完全無料出会い系サイト
恋愛
恋探し
Left by ai on 10/21/2008 12:22 AM

Leave Your Comment

Title*
Name*
Email (never displayed)
 (will show your gravatar)
Url
Comment*

Please add 2 and 8 and type the answer here:

Preview Your Comment.