Пример #1
0
        void UpdateControls()
        {
            var rl = c1SsrsDocumentSource1.DocumentLocation as SSRSReportLocation;

            if (rl != null)
            {
                _reportPanel.Text = ReportSession.Combine(rl.ReportServer, rl.ReportPath);
            }
            else
            {
                _reportPanel.Text = string.Empty;
            }

            var  treeNode          = tvReports.SelectedNode;
            bool showReportEnabled = false;

            if (treeNode != null && !c1SsrsDocumentSource1.IsBusy)
            {
                var ci = treeNode.Tag as RS.CatalogItem;
                if (ci != null && ci.Type == RS.ItemTypeEnum.Report)
                {
                    showReportEnabled = true;
                }
            }
            btnShowReport.Enabled = showReportEnabled;
            btnHideReport.Enabled = c1SsrsDocumentSource1.DocumentLocation != null;
        }
Пример #2
0
        private void UpdateControls()
        {
            var rl = c1SsrsDocumentSource1.DocumentLocation as SSRSReportLocation;

            if (rl != null)
            {
                tbReport.Text = ReportSession.Combine(rl.ReportServer, rl.ReportPath);
            }
            else
            {
                tbReport.Text = "None";
            }
            var  treeNode          = tvReports.SelectedNode;
            bool showReportEnabled = false;

            if (treeNode != null && !c1SsrsDocumentSource1.IsBusy)
            {
                var ci = treeNode.Tag as RS.CatalogItem;
                if (ci != null && ci.Type == RS.ItemTypeEnum.Report)
                {
                    showReportEnabled = true;
                }
            }
            btnShowReport.Enabled = showReportEnabled;
            if (c1SsrsDocumentSource1.PageCount > 0)
            {
                tbState.Text = string.Format("Pages: {0}", c1SsrsDocumentSource1.PageCount);
            }
            else
            {
                tbState.Text = "Empty";
            }
        }