Wednesday, May 25, 2016

Super fast MSSQL remove non-numeric characters from phone number

I modified the original query to use a numbers table I created so I don't have to rely on 
Microsofts master..spt_values table.

SELECT   
 (SELECT CAST(CAST(
    (SELECT SUBSTRING(PhoneNumber, Number, 1)        
     FROM dbo.Numbers        
     WHERE Number <= LEN(PhoneNumber) 
        AND SUBSTRING(PhoneNumber, Number, 1) LIKE '[0-9]' FOR XML Path('')) 
   AS xml) AS varchar(MAX)))
FROM YourContactTable

I found this method on http://programcsharp.com/blog/post/strip-non-numeric-characters-from-a-string-in-sql-server


Wednesday, May 7, 2014

SSRS 2008 R2 Reports in IE, Chrome, Firefox, and Opera

We added the following JS to the SSRS Server Microsoft SQL Server\MSRS**.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js" .


function pageLoad()
{   
    var element = document.getElementById("ctl31_ctl10");

    if (element)
    {
        element.style.overflow = "visible";
    }

    var element2 = document.getElementById("ctl32_ctl09");

    if (element2)
    {
        element2.style.overflow = "visible";
    }

}

Be sure to clear the cache in your browser before rerunning the report.

http://stackoverflow.com/questions/5428017/cannot-view-ssrs-2008-r2-ssrs-2012-reports-in-safari-chrome-but-works-fine-in

Thanks for your post Emanuele Greco

Tuesday, April 29, 2014

Visual Studio 2012 report server could not be found error

  • Open the Reporting Services Configuration manager by going to All Programs> Microsoft SQL Server 2012> Configuration Tools> Reporting Services Configuration Manager
  • On the left hand side select Web Service URL
  • In the Report Server Web Service Virtual Directory select Advanced
  • In the Multiple HTTP Identities for the Report Server Web Service select Add
  • Select the Host Header Name radio button and add the name of your server and click OK
  • In Visual Studio 2012 make sure the Target Server URL matches the URL in the Report Server Web Service URLs section http://YOURSERVER/ReportServer


Tuesday, June 11, 2013

"Cannot find one or more components" Error When Executing Visual Studio Express 2012

Today when I tried to open Visual Studio Express 2012 on my work computer I received the error
 "Cannot find one or more components. Please re-install application". After spending too much time un-installing and re-installing VSE12, searching for .dll's(ATL90.dll had the most Google results), updating the  "c++ redistributable" package, and downloading software(Dependency Walker). Ugh... I final found the fix. I deleted the key
C:\\ProgramFiles(x86)\\MicrosoftVisualStudio11.0\\Common7\\IDE\\WDExpress
from the registry: [HKEY_CURRENT_USER\Software\Microsoft\WindowsNT\CurrentVersion\
AppCompatFlags\Layers]. Many thanks go out to VStamenov for the answer. I'm not really sure of the original cause of the error, the conversation in the forum is saying that add-ins could be the issue but I am not using any. The site is at http://social.msdn.microsoft.com/Forums/en-US/vssetup/thread/d848776a-b00f-4311-ab09-3a8777462968
I hope this helps somebody!

Monday, April 22, 2013


// A Hello World! program in C#. 
using System;
namespace HelloWorld
{
    class Hello 
    {
        static void Main() 
        {
            Console.WriteLine("Hello World, Welcome to Maditguy72's blog!");

            // Keep the console window open in debug mode.
            Console.WriteLine("Press any key to exit.");
            Console.ReadKey();
        }
    }
}