How to give extra space in between date digit for cheque printing in ax 2009 ?

Hi

I am using AP->Payment journal->functions->generate payments->ok

The report Cheque_UK is being printed.

According to client it should be printed exactly in the box.

So for indian cheque we have right corner date box in dd mm yyyy in box format. [ 8 square boxes]

In my report the date is printing inside the box and i used Date separator

so my date is coming 30 space 12 space 2013

But client wants 3 should be printed in first box and then 0 should be printed in 2nd box like wise.8 digit dates should be printed in 8 boxes respectively.

Is it possible to do this ?

// Try this in your Jobs,

// 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);

Hi satya,

We can do that by running the below code you can able to get the 8 digit date and need to assign those control to the report design.

static void Job16(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));
}

Regards,

Abbas