hi im using the print method in vb.net to pring out a simple report of my access db.
In my table i have simple data for now,
first name
surname
address 1
address 2
address 3
address 4
now,i want to print these like :
Name Address
tom jones address1,etc,etc,etc
mary smith address1,etc,etc,etc
the names and address are all different lenghts so they are not aligned properly and look like this :
Name Address
tom jones address1,etc,etc,etc
mary smith address1,etc,etc,etc
I made a routine to test the length of the name,if it is less than 25 chars then to go into a loop and pad the end of the string with spaces until it becomes 25 chars long.
I do the same with the address fields only i want it to be 46 chars long.
When i do this and print it out the spaces are different.
If i replace the added space with a number for example it shows up aligned ok :
Name Address
tom jones (25 chars) address1,etc,etc,etc
mary smith (25 chars) address1,etc,etc,etc
Name Address
tom jones0000000000000address1,etc,etc,etc
mary smith000000000000address1,etc,etc,etc
does the print method treat the space character differently ?
should i check the name field for 25 spaces before i save it to the db and pad it with spaces then ??
any ideas wud be greatly appreciated
In my table i have simple data for now,
first name
surname
address 1
address 2
address 3
address 4
now,i want to print these like :
Name Address
tom jones address1,etc,etc,etc
mary smith address1,etc,etc,etc
the names and address are all different lenghts so they are not aligned properly and look like this :
Name Address
tom jones address1,etc,etc,etc
mary smith address1,etc,etc,etc
I made a routine to test the length of the name,if it is less than 25 chars then to go into a loop and pad the end of the string with spaces until it becomes 25 chars long.
I do the same with the address fields only i want it to be 46 chars long.
When i do this and print it out the spaces are different.
If i replace the added space with a number for example it shows up aligned ok :
Name Address
tom jones (25 chars) address1,etc,etc,etc
mary smith (25 chars) address1,etc,etc,etc
Name Address
tom jones0000000000000address1,etc,etc,etc
mary smith000000000000address1,etc,etc,etc
does the print method treat the space character differently ?
should i check the name field for 25 spaces before i save it to the db and pad it with spaces then ??
any ideas wud be greatly appreciated