private void FillPropertiesListview(rs2010.CatalogItem selItem)
        {
            rs2010.Property[] property = null;
            // Clear Listview
            propertiesListview.Items.Clear();

            try
            {
                // Properties parameter is null so all properties for the specified item are returned.
                property = rs.GetProperties(selItem.Path, null);

                // Display properties in a Listview
                foreach (rs2010.Property prop in property)
                {
                    ListViewItem lstItem = propertiesListview.Items.Add(prop.Name);
                    lstItem.SubItems.Add(prop.Value);
                }
            }
            catch (Exception ex)
            {
                // Note: In a production application you would want to use a specific exception type
                this.HandleGeneralException(ex);
            }
        }
        private string GetFolderPath(rs2010.CatalogItem item)
        {
            string delimiter = "/";

            // Split the path string into the folder names as parts
            Regex rx = new Regex(delimiter);
            string[] pathParts = rx.Split(item.Path);

            // Check to see if the item has a virtual path and return the
            // virtual path for items that support it, like My Reports
            if (item.VirtualPath != null && pathParts[1] != "Users Folders")
                return item.VirtualPath;
            else
                return item.Path;
        }
        public void RenderReport(rs2010.CatalogItem report)
        {
            string currentPath;

            // If the path of the item is the root of the catalog
            // set path equal to /,
            if (this.Path == "/")
                currentPath = this.Path;
            else
                currentPath = this.Path + "/";

            // Build string for url access
            string url = serverPathTextbox.Text + "?" + currentPath + report.Name;

            try
            {
                ReportViewer viewer = new ReportViewer();
                viewer.Url = url;
                viewer.Show();
            }

            catch (Exception ex)
            {
                this.HandleGeneralException(ex);
            }
        }