Esempio n. 1
0
        static DataSourceDefinition ConfigureDataSourceDefinition()
        {
            DataSourceDefinition dataSourceDefinition = new DataSourceDefinition();

            dataSourceDefinition.CredentialRetrieval = CredentialRetrievalEnum.Integrated;
            dataSourceDefinition.ConnectString = "Data Source="+ Properties.Settings.Default.SQLServerInstance + ";Initial Catalog="+Properties.Settings.Default.SQLDatabaseName + ";Trusted_Connection=true";
            System.Console.WriteLine(dataSourceDefinition.ConnectString  + " CONNECTION STRING");
            dataSourceDefinition.Enabled = true;
            dataSourceDefinition.EnabledSpecified = true;
            dataSourceDefinition.Extension = "SQL";
            dataSourceDefinition.ImpersonateUserSpecified = false;

            return dataSourceDefinition;
        }
Esempio n. 2
0
 static void UploadDataSource(String dataSourceName,DataSourceDefinition definition)
 {
     ReportingService2010 rs = new ReportingService2010();
     rs.Url = Properties.Settings.Default.SSRSUrl;
     rs.Credentials = System.Net.CredentialCache.DefaultCredentials;
     rs.CreateDataSource(dataSourceName, Properties.Settings.Default.SSRSFolder, true, definition, null);
 }
Esempio n. 3
0
 /// <remarks/>
 public void TestConnectForDataSourceDefinitionAsync(DataSourceDefinition DataSourceDefinition, string UserName, string Password) {
     this.TestConnectForDataSourceDefinitionAsync(DataSourceDefinition, UserName, Password, null);
 }
Esempio n. 4
0
 /// <remarks/>
 public void TestConnectForDataSourceDefinitionAsync(DataSourceDefinition DataSourceDefinition, string UserName, string Password, object userState) {
     if ((this.TestConnectForDataSourceDefinitionOperationCompleted == null)) {
         this.TestConnectForDataSourceDefinitionOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTestConnectForDataSourceDefinitionOperationCompleted);
     }
     this.InvokeAsync("TestConnectForDataSourceDefinition", new object[] {
                 DataSourceDefinition,
                 UserName,
                 Password}, this.TestConnectForDataSourceDefinitionOperationCompleted, userState);
 }
Esempio n. 5
0
 /// <remarks/>
 public void SetDataSourceContentsAsync(string DataSource, DataSourceDefinition Definition, object userState) {
     if ((this.SetDataSourceContentsOperationCompleted == null)) {
         this.SetDataSourceContentsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSetDataSourceContentsOperationCompleted);
     }
     this.InvokeAsync("SetDataSourceContents", new object[] {
                 DataSource,
                 Definition}, this.SetDataSourceContentsOperationCompleted, userState);
 }
Esempio n. 6
0
 public bool TestConnectForDataSourceDefinition(DataSourceDefinition DataSourceDefinition, string UserName, string Password, out string ConnectError) {
     object[] results = this.Invoke("TestConnectForDataSourceDefinition", new object[] {
                 DataSourceDefinition,
                 UserName,
                 Password});
     ConnectError = ((string)(results[1]));
     return ((bool)(results[0]));
 }
Esempio n. 7
0
 /// <remarks/>
 public void SetDataSourceContentsAsync(string DataSource, DataSourceDefinition Definition) {
     this.SetDataSourceContentsAsync(DataSource, Definition, null);
 }
Esempio n. 8
0
 public void SetDataSourceContents(string DataSource, DataSourceDefinition Definition) {
     this.Invoke("SetDataSourceContents", new object[] {
                 DataSource,
                 Definition});
 }
Esempio n. 9
0
 /// <remarks/>
 public void CreateDataSourceAsync(string DataSource, string Parent, bool Overwrite, DataSourceDefinition Definition, Property[] Properties, object userState) {
     if ((this.CreateDataSourceOperationCompleted == null)) {
         this.CreateDataSourceOperationCompleted = new System.Threading.SendOrPostCallback(this.OnCreateDataSourceOperationCompleted);
     }
     this.InvokeAsync("CreateDataSource", new object[] {
                 DataSource,
                 Parent,
                 Overwrite,
                 Definition,
                 Properties}, this.CreateDataSourceOperationCompleted, userState);
 }
Esempio n. 10
0
 /// <remarks/>
 public void CreateDataSourceAsync(string DataSource, string Parent, bool Overwrite, DataSourceDefinition Definition, Property[] Properties) {
     this.CreateDataSourceAsync(DataSource, Parent, Overwrite, Definition, Properties, null);
 }
Esempio n. 11
0
 public CatalogItem CreateDataSource(string DataSource, string Parent, bool Overwrite, DataSourceDefinition Definition, Property[] Properties) {
     object[] results = this.Invoke("CreateDataSource", new object[] {
                 DataSource,
                 Parent,
                 Overwrite,
                 Definition,
                 Properties});
     return ((CatalogItem)(results[0]));
 }