Posts

Showing posts from August, 2015

Asp.net Charts - Url on Series Data Points

 So if you have an Asp.net chart and need to have some kind of Url over the data point areas (esp the individual bars on a bar chart, or the slices of a pie chart , etc) on the chart itself you can access the individual Points on each of your Series and set the Url property.  Another option is to set a PostBackValue which can be accessed in a click event of the chart.  This actually ended up being scrapped because I found that if you resize the image then the click areas do not match up with the image anymore.  With our responsive setup have the images be responsive was a necessity as well.  Normally the asp.net chart images have a fixed width and height...well now I know why.    DataTable dt= GetSource();         if (dt.Count != 0)         {                           int i = 0;                 for (i = 0; i <= dt.Rows.Count - 1; i++)                 {                     string x = (string)dt.Rows[i]["name"];                     decimal y = (decimal)dt.Rows[i][&quo

Fun With Automate 9 Errors

Encountered several issues yesterday within Automate 9. One problem was that the server was somehow not letting go of some files on one of the tasks resulting in the error "FTP Failed (Error: Access denied, file is locked in another upload session or by another application (550)).  The solution to that was to restart the server since I could not see what was holding on to it.  There might be other programs I could have gotten to help me identify what was holding it, but I was kind of under pressure. Another FTP task was giving some obscure Winsock Error (?)  in response to attempting to encrypt and move a file.  The error wa s "Cryptography failed (Error : File system operation failed with error (error code is 103429))". This seemed to be resolved by running the task as Administrator, or it was resolved by the rebooting of the server. On some other FTP tasks I was getting "Could not determine current location error".  This was happening when trying to

String format for Money With No Cents.

Change the display format from {C} to {C0} which means money format but no cents.  Simple but easy to forget...

Common Table Expressions CTE in SQL SERVER - Get Top Value of a Group

So I had a problem where one of the companies we work with wanted data for a column, however they wanted a single example.  However in our system we can have multiple entries for that column. I needed to get a single example other wise when joining would show other many more rows than necessary for what they wanted.  SO I turned to Common Table Expressions (CTE)s. Although turned out that because I was excluding data one of my bosses said just not to send that field, because it would be similar to misinformation. Hah. ;With PBs(accountID,PBName,rn) AS ( select ACV.accountID, B.lastName + ', ' + B.firstName + ' ' + B.middleInit, ROW_NUMBER() OVER (PARTITION BY acv.accountID ORDER BY acv.accountID DESC) as rn FROM  ACV --- etc joins where --conditions group by ACV.accountID, B.lastName + ', ' + B.firstName + ' ' + B.middleInit ) SELECT --other fields PB.PBName FROM  ACV ---joins LEFT OUTER JOIN PBs