Here's a link to a useful character code chart:
http://tlt.its.psu.edu/suggestions/international/bylanguage/mathchart.html
and to get the Windows Character Map Utility:
Start>>Programs>>Accessories>>System Tools
and simply copy and paste the relevant character or obtain the unicode number from the keystoke value, where applicable, or convert the hex to decimal.
Hexadecimal to decimal converter:
http://easycalculation.com/hex-converter.php
Friday, 9 April 2010
Array example - Crystal
Local Numbervar counter := 1;
Local Stringvar Array taskdates;
Local Datetimevar dates := CurrentDate;
Local Datetimevar finishdate := DateAdd("yyyy",5,CurrentDate);
Local Stringvar returnstring;
Do
(
//set array size to counter, initally 1, preserving previous size and values
Redim Preserve taskdates[counter];
//assign dates value, initially CurrentDate to array element numbered counter, initially 1
taskdates[counter] := ToText(dates, "dd-MMM-yyyy");
//increment date variable by 1 year
dates := DateAdd("yyyy",1,dates);
//increment counter by 1
counter := counter+1;
)
//continue do loop while date variable is less than or equal to finishdate
While dates <= finishdate ;
returnstring := Join(taskdates, Chr(13))
Local Stringvar Array taskdates;
Local Datetimevar dates := CurrentDate;
Local Datetimevar finishdate := DateAdd("yyyy",5,CurrentDate);
Local Stringvar returnstring;
Do
(
//set array size to counter, initally 1, preserving previous size and values
Redim Preserve taskdates[counter];
//assign dates value, initially CurrentDate to array element numbered counter, initially 1
taskdates[counter] := ToText(dates, "dd-MMM-yyyy");
//increment date variable by 1 year
dates := DateAdd("yyyy",1,dates);
//increment counter by 1
counter := counter+1;
)
//continue do loop while date variable is less than or equal to finishdate
While dates <= finishdate ;
returnstring := Join(taskdates, Chr(13))
Monday, 22 March 2010
Remove Carriage Return, Line Feed and Tab - SQL
Remove Carriage Return, Line Feed and Tab characters in T-SQL.
REPLACE(REPLACE(REPLACE(Field, CHAR(10), ''), CHAR(13), ''), CHAR(9), '')
REPLACE(REPLACE(REPLACE(Field, CHAR(10), ''), CHAR(13), ''), CHAR(9), '')
Friday, 12 March 2010
Check whether a string was all in uppercase - CR
I needed a quick way to check whether a string was all uppercase.
Using the InStr function:
InStr ({fieldname},(UpperCase ({fieldname})) ,0 )
The syntax being:
InStr([start,]string1,string2[,compare])
start- an optional starting position
string1,2 - strings to compare
compare - either 0 or 1, 0 being a binary comparison, 1 being textual.
http://msdn.microsoft.com/en-us/library/wybb344c(VS.85).aspx
Using the InStr function:
InStr ({fieldname},(UpperCase ({fieldname})) ,0 )
The syntax being:
InStr([start,]string1,string2[,compare])
start- an optional starting position
string1,2 - strings to compare
compare - either 0 or 1, 0 being a binary comparison, 1 being textual.
http://msdn.microsoft.com/en-us/library/wybb344c(VS.85).aspx
Wednesday, 3 March 2010
Create Button Style - SSRS
To create a reasonable 'button style' for a text box:
BackgroundColor = WhiteSmoke
BorderColor = WhiteSmoke
BorderStyle = Outset
BorderWidth = 2pt
Color = Black
Subscribe to:
Posts (Atom)

