Click here to Skip to main content
15,914,066 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a contacts book application which uses a SQL Server 2005 Express database. I would like to print the information in the database in two columns on standard letter size paper with 5 contacts to a columns. Each contact contains 11 lines, with a double space between contacts. For example:

Column 1     Column 2
---------    ---------
Contact 1    Contact 6
Contact 2    Contact 7
Contact 3    Contact 8
Contact 4    Contact 9
Contact 5    Contact 10
Posted
Updated 22-Feb-11 9:21am
v2

You cannot do it in just one text box reliably without the risk of shifting columns if one of the column sub-strings changes its length.

More exactly, you can do it using some monospace font. This is the solution: you can calculate exact number of blank spaces between column based on the contents of you strings. I think this solution will be extremely ugly.

So, the only nice looking solution would be using a list view or grid view.

—SA
 
Share this answer
 
Hi,

If you want to do the reporting using the tools that can be obtained with the database I suggest that you have a look at the SSRS (SQL Server Reporting Services):

Reporting Services in SQL Server 2005 Express Edition with Advanced Services[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 22-Feb-11 15:26pm    
This is certainly a right option, my 5.
I tried to answer close to initial indent of OP though.
--SA
Wendelius 22-Feb-11 15:32pm    
Thanks. Yes I noticed your answer and was just about to comment it. If the data is to be shown on UI only (specifically on a form) ListView would be much much lighter and easier option than SSRS, definitely worth a 5. Actually we got both options covered :)
Sergey Alexandrovich Kryukov 22-Feb-11 15:37pm    
Thank you for your useful note and a vote (it it was you)
Teamwork !:-)
--SA
Wendelius 22-Feb-11 15:50pm    
I'm responsible only for the other vote (since you have two of them) :)
Sergey Alexandrovich Kryukov 22-Feb-11 15:52pm    
:-)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900