give extra space in between date digit for cheque printing in SSRS report
static void Job12(Args _args){
Transdate dat;
Str s1,s2,s3,s4,s5,s6,s7,s8;
str nh;
;
dat = mkdate(1,5,2018);
nh = stralpha(date2str(dat,123,2,2,2,2,4));
s1 = substr(nh,1,1);
s2 = substr(nh,2,1);
s3 = substr(nh,3,1);
s4 = substr(nh,4,1);
s5 = substr(nh,5,1);
s6 = substr(nh,6,1);
s7 = substr(nh,7,1);
s8 = substr(nh,8,1);
info(strfmt("%1 %2 %3 %4 %5 %6 %7 %8 %9",nh,s1,s2,s3,s4,s5,s6,s7,s8));
}
// Use Display Method for 8 Square Box which contains String Controls
// and in those 8 display methods apply below concept for respective controls
SysDate DateVal;
str DateStrVal;
int DateLength;
str DayDigit1, DayDigit2;
str MonthDigit1, MonthDigit2;
str YearDigit1, YearDigit2, YearDigit3, YearDigit4;
;
DateVal = today();
DateStrval = date2str(DateVal, // DateValue
123, // Date Month Year Sequence
2, // Display Day Format in 2 digits
1, // Separator1
2, // Display Month Format in 2 Digits
1, // Separator2
4); // Display Year Format in 4 digits
info(DateStrVal);
DateLength = strLen(DateStrval); // Length Of Date
info(int2Str(DateLength));
DayDigit1 = substr(DateStrval, 1, 1); // Getting First Digit of Date
info(DayDigit1);
DayDigit2 = substr(DateStrval, 2, 1); // Getting Second Digit of Date
info(DayDigit2);
MonthDigit1 = substr(DateStrval, 4, 1); // Getting First Digit of Month
info(MonthDigit1);
MonthDigit2 = substr(DateStrval, 5, 1); // Getting Second Digit of Month
info(MonthDigit2);
YearDigit1 = substr(DateStrval, 7, 1); // Getting First Digit of Year
info(YearDigit1);
YearDigit2 = substr(DateStrval, 8, 1); // Getting Second Digit of Year
info(YearDigit2);
YearDigit3 = substr(DateStrval, 9, 1); // Getting Second Digit of Year
info(YearDigit3);
YearDigit4 = substr(DateStrval, 10, 1); // Getting Second Digit of Year
info(YearDigit4);
No comments:
Post a Comment