I have a table with 4 columns (Morning/Afternoon/Evening/Night)char(1) field data will Y/N in the column

with this table i am creating a crystal report
the output should be something like this

if Morning and night is Y

Mor.........Night (nine dots)

If only Morning is Y
Mor ( not dots)

If Afternoon and Evening
...Afternoon...Evening

if Morning and Evening
Mor......Evening(6 dots between mor and ever )

if Morning Afternoon evening and night is Y
Mor...After...Eve...Night

like this i want in crystal report
I tried like this but not working properly
in cystal report formula editor

local stringvar flag;
if {Table.Morning}='Y' then
flag:='Mor'
else
flag:='...'

if {Table.Afternoon}='Y' then
flag:=Flag+'after'
else
flag:=flag;

but is not as per desire