I am manually formatting inside a memo field. Prior to inserting into the memo, I create a string of data to insert. The string is manually formatted. Below is an example:
m.svngs = m.svngs+padr(rpt.pat_id,15,' ')+chr(9)+chr(9)+padr(rpt.name,40,' ')+chr(9)+chr(9)+padr(rpt.critsel,50,' ')+chr(9)+chr(9)+padr(rpt.svngsamt,15,' ')+chr(13)
My problem is when I pad the strings. I am finding that if I was to pad the string 'test' to a lenght of 10 and then add another string of 'data' it would look something like this: 'test data'. If the next record was 'sample' and I added 'data' it would look like this: 'sample data'
When I do this, I am adding carriage returns using CHR(13), so my data would look like the following in the memo field:
'test data'
'sample data'
This looks great in this post because the spaces are taking the space of an actual space. In the memo field the space only takes up a small portion so my manual formatting is skewed. I see things like:
'test data'
'sample data'
(In the memo field the space between test
and data is in fact 10 spaces (what I padded to))
It is also 10 spaces padded between sample and data, it only looks different because there are more characters filling space in the 'sample data' example.
This is because in the memo you could use two to three spaces to fill the same space a letter 'B' would take up. This is causing irregular formatting. Any ideas on how to get around it so I can format the memo manually but appropriately?
Thanks in advance.
m.svngs = m.svngs+padr(rpt.pat_id,15,' ')+chr(9)+chr(9)+padr(rpt.name,40,' ')+chr(9)+chr(9)+padr(rpt.critsel,50,' ')+chr(9)+chr(9)+padr(rpt.svngsamt,15,' ')+chr(13)
My problem is when I pad the strings. I am finding that if I was to pad the string 'test' to a lenght of 10 and then add another string of 'data' it would look something like this: 'test data'. If the next record was 'sample' and I added 'data' it would look like this: 'sample data'
When I do this, I am adding carriage returns using CHR(13), so my data would look like the following in the memo field:
'test data'
'sample data'
This looks great in this post because the spaces are taking the space of an actual space. In the memo field the space only takes up a small portion so my manual formatting is skewed. I see things like:
'test data'
'sample data'
(In the memo field the space between test
and data is in fact 10 spaces (what I padded to))
It is also 10 spaces padded between sample and data, it only looks different because there are more characters filling space in the 'sample data' example.
This is because in the memo you could use two to three spaces to fill the same space a letter 'B' would take up. This is causing irregular formatting. Any ideas on how to get around it so I can format the memo manually but appropriately?
Thanks in advance.