public MainWindow() { InitializeComponent(); _ssrsDocSource = new C1SSRSDocumentSource(); _credential = new NetworkCredential(_ssrsUserName, _ssrsPassword, _ssrsDomain); _ssrsDocSource.Credential = _credential; Loaded += SsrsPage_Loaded; Unloaded += SsrsPage_Unloaded; }
/// <summary> /// Clean up any resources being used. /// </summary> /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param> protected override void Dispose(bool disposing) { if (disposing) { if (ssrs != null) { c1FlexViewer1.DocumentSource = null; ssrs.Dispose(); ssrs = null; } if (components != null) { components.Dispose(); } } base.Dispose(disposing); }
public FlexSsrsViewer() { InitializeComponent(); C1Zoom.Target = null; var selReportLabel = new C1.Win.Ribbon.RibbonButton(); c1FlexViewer1.Ribbon.QatItemsHolder.Add(selReportLabel); c1FlexViewer1.Ribbon.Qat.ItemLinks.Add(selReportLabel); selReportLabel.Text = "Select Report:"; selReportLabel.Click += selReportLabel_Click; comboReports = new RibbonComboBox(); comboReports.GripHandleVisible = true; comboReports.TextAreaWidth = 170; comboReports.MaxDropDownItems = 12; comboReports.DropDownStyle = RibbonComboBoxStyle.DropDownList; comboReports.SelectedIndexChanged += comboReports_SelectedIndexChanged; var coll = comboReports.Items; coll.Add(new RibbonButton("Company Sales")); coll.Add(new RibbonButton("Customers Near Stores")); coll.Add(new RibbonButton("Employee Sales Summary")); coll.Add(new RibbonButton("Employee Sales Summary Detail")); coll.Add(new RibbonButton("Product Catalog")); coll.Add(new RibbonButton("Product Line Sales")); coll.Add(new RibbonButton("Sales by Region")); coll.Add(new RibbonButton("Sales Order Detail")); coll.Add(new RibbonButton("Store Contacts")); coll.Add(new RibbonButton("Territory Sales Drilldown")); c1FlexViewer1.Ribbon.QatItemsHolder.Add(comboReports); c1FlexViewer1.Ribbon.Qat.ItemLinks.Add(comboReports); ssrs = new C1SSRSDocumentSource(); ssrs.Credential = new System.Net.NetworkCredential("ssrs_demo", "bjqveS5gh89BH1Q", ""); }