Tuesday, December 30, 2014

Set Overlapping Charts Transparancy in SSRS

I have the requirement to show combination of Area and Bar chart in the same SSRS chart report, it works by changing the Chart type of series but the problem i faced is overlapping of both charts . To resolve this we have one solution to set the transparency of front chart so that the other one is visible to end user.


  1. To set transparency Select the Series Properties
  2. Select Fill > Color > More Colors
  3. On the right part of the screen you see the color's RGB values but also a Transparency setting with a slider.  Use the slider to make the color less or more transparent




Monday, December 15, 2014

Export TFS backlog to Excel

Following are the steps to be performed to export TFS Backlog to excel.


  • Open Microsoft Excel.
  • Go to Team tab, the first option available is New List.
  • Click New List, and you will get Connected to TFS.
  • Choose your Team Project.
  • Then you get a New List box, where you can select your backlog query in the "Query list".
  • Click OK, selected query result will get exported to Excel File.

Tuesday, December 9, 2014

Formatting code snippets for blogging on Blogger

http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html

Script Task : DownLoad File From FTP

The Script task provides code to perform functions that are not available in the built-in tasks and transformations that SQL Server Integration Services provides.

Following is the example written in C# to download file from FTP server and store it on local machine, though SSIS built in FTP Task provides this functionality but if we have our custom requirements manipulate that file before storing or ti get only specific files from server we can write our own.


public void Main()
  {
            try
            {
    ConnectionManager ftpcm = Dts.Connections["FTP Connection Manager"];
    FtpClientConnection ftpConn = new FtpClientConnection(ftpcm.AcquireConnection(null))
          
                ftpConn.Connect();
             
 // Set work folder with the value of the variable
                ftpConn.SetWorkingDirectory(Dts.Variables["FTPSource"].Value.ToString());

                String[] fileNames;
                String[] folderNames;
                ftpConn.GetListing(out folderNames, out fileNames);
                
                string selectedFileName=string.Empty;
                foreach (string file in fileNames)
                {

                   if(file.ToLower().Contains("readme"))
                   {
                    selectedFileName= file;
                    break;
                   }
                }

                if (!string.IsNullOrEmpty(selectedFileName))
                {
                    ftpConn.ReceiveFiles(fileNames, Dts.Variables["FTPDestination"].Value.ToString(), true, false);

                    // Close connection
                    ftpConn.Close();
                    Dts.TaskResult = (int)ScriptResults.Success;
                    return;
                    
                }
                else
                {
                   
                    // add code according to your requirments if file not found on ftp
                
                  
                }
            }

            catch (Exception ex)
            {
                Dts.Events.FireError(0, "Script Task", "Error in processing file", string.Empty, 0);
                Dts.TaskResult = (int)ScriptResults.Failure;
                //Log Exception
            }

   Dts.TaskResult = (int)ScriptResults.Success;
 }
Reference: http://www.mssqltips.com/sqlservertip/1641/get-list-of-files-from-an-ftp-server-in-sql-server-integration-services/

SQL Server Integration Services (SSIS) - FTP Task

FTP Task