Guoqi Zheng said:
Thanks for your reply.
I need to determine the space between two characters.
For example, nr. 123456
I need to determine the space between "1" and "2" and "3".....
1<space> 2 <space>3<space>4<space>5<space>6
I need to be able to set the width of <space>.
Is this possible?
I'm not sure that I understand what you want, but if I do, you might try
to accomplish this in three different ways.
1. Insert a fixed number of spaces between the characters of the string
before printing it. You might have a function that receives a string or
a variant value that it converts to a string, then simply inserts some
number of spaces between every pair of characters and returns the
result. The controls on the report would have their controlsources set
to return the result of calling this function with the actual data to be
printed. To my mind, this is the simplest approach to the problem, but
I don't know if it's what you want.
2. Choose a font that has the character spacing you want built into the
design of the characters. Then you'd simply print the data in that
font. This would probably mean actually defining the font yourself
using a font-design tool of some sort. The font would then have to be
installed on every computer where your application is to run.
3. Take over complete control of the printing of the character string.
Use the Report object's CurrentX and CurrentY methods to specify the
print position for each each character in the string before printing
that one character using the report object's Print method. I've never
done anything like this, but it should be possible.