Esempio n. 1
0
        private bool CheckIfReportExists(string SsrsItemToFind, string directory, bool DeleteOrNot)
        {
            CatalogItem[] items = null;
            // Retrieve a list of all items from the report server database.
            try
            {
                items = rs.ListChildren(@"/", true);

                foreach (CatalogItem g in items)
                {
                    if (SsrsItemToFind == g.Name)
                    {
                        return(true);
                    }
                }
            }

            catch (System.Web.Services.Protocols.SoapException e)
            {
                Console.WriteLine(e.Detail.OuterXml);
            }


            return(false);
        }
Esempio n. 2
0
        private bool CheckIfExists(string SsrsItemToFind)
        {
            CatalogItem[] items = null;
            // Retrieve a list of all items from the report server database.
            try
            {
                items = rs.ListChildren(@"/", true);
                foreach (CatalogItem g in items)
                {
                    //   Console.WriteLine(g.Path);
                    if (SsrsItemToFind == g.Path)
                    {
                        Console.WriteLine("Already Exists => " + SsrsItemToFind);
                        return(true);
                    }
                }
            }

            catch (System.Web.Services.Protocols.SoapException e)
            {
                Console.WriteLine(e.Detail.OuterXml);
            }


            return(false);
        }