public FormProperties(string _path, ReportItemTypes _type) { this.InitializeComponent(); this.rs = ReportingServicesFactory.CreateFromSettings(FormSSRSExplorer.SelectedServer, (TreeView)null, (ToolStripStatusLabel)null, (ListView)null); this.path = _path; this.itemType = _type; }
public static Controller CreateFromSettings(ServerSettingsConfigElement config, TreeView tvReportServer, ToolStripStatusLabel lbl, ListView lv) { return(new Controller(tvReportServer, lbl, lv) { RsFacade = ReportingServicesFactory.CreateFacadeFromSettings(config) }); }
public FormSSRSSItemSelector(ViewItems viewItems) { this.InitializeComponent(); this.viewItem = viewItems; try { this.rs = ReportingServicesFactory.CreateFromSettings(FormSSRSExplorer.SelectedServer, this.tvReportServer, (ToolStripStatusLabel)null, (ListView)null); } catch (Exception ex) { LogHandler.WriteLogEntry(ex); } this.rs.ViewItem = this.viewItem; }
private void Connect() { if (FormSSRSExplorer.SelectedServer != null) { if (string.IsNullOrEmpty(FormSSRSExplorer.SelectedServer.Url)) { this.ShowSelectServer(); } else { try { this.rs = ReportingServicesFactory.CreateFromSettings(FormSSRSExplorer.SelectedServer, this.tvReportServer, this.toolStripStatusLabel, this.lvItems); } catch (Exception ex) { LogHandler.WriteLogEntry(ex); } } try { this.rs.PopulateTreeView(FormSSRSExplorer.SelectedServer.Alias); this.toolStripStatusLabel.Text = string.Format("Connected to {0}", (object)FormSSRSExplorer.SelectedServer.Url); this.Text = "SSRS Explorer - connected to " + FormSSRSExplorer.SelectedServer.Alias; } catch (Exception ex) { this.Text = "SSRS Explorer - not connected"; this.toolStripStatusLabel.Text = "Not connected"; int num = (int)MessageBox.Show("Cannot connect. Check server settings.", "Initialisation failed.", MessageBoxButtons.OK, MessageBoxIcon.Hand); this.rs = (Controller)null; LogHandler.WriteLogEntry(string.Format("Error connecting to {0}:", (object)FormSSRSExplorer.SelectedServer.Url)); LogHandler.WriteLogEntry(ex); } } else { this.ShowSelectServer(); } }