944,092 Members | Top Members by Rank

Ad:
  • MS SQL Discussion Thread
  • Unsolved
  • Views: 20159
  • MS SQL RSS
Apr 16th, 2007
0

How to print tables in SQL Server 2005

Expand Post »
Hi,

I have a small database with 15 tables and 20-40 records in each table. I just want to ask how can I print all the tables together with their names, atribute names and all the records? (the Print option from the File menu is not active)

Thanks,
Robert
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
quiptro is offline Offline
19 posts
since Jan 2007
Apr 16th, 2007
0

Re: How to print tables in SQL Server 2005

It depends

You can either:

Use The MSSQL Managament Studio ( i think)

Write a program / web app to do it

Use Crystal Reports?
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,534 posts
since Apr 2005
Apr 16th, 2007
0

Re: How to print tables in SQL Server 2005

In Sql Server Management studio expand databases on the left, expand the database that contains your tables, right click on Database diagrams and choose 'New database diagram', you may at this point receive a message saying you don't have all the support objects required, click ok to have them created. A dialogue box appears with a list of the tables, select them all and click add. Now choose Print from the file menu. You may need to manually size and drag the tables around if you want to fit them to one A4 page.
Last edited by hollystyles; Apr 16th, 2007 at 7:08 pm.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Apr 16th, 2007
0

Re: How to print tables in SQL Server 2005

Thanks for the prompt response. I followed your instructions and created the diagram and the Print option became active. However, it only printed the diagram and all the relationships mapped, and did not print the tables with their content (the records). I just need to simply print the tables (just like if they were in exel). Thanks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
quiptro is offline Offline
19 posts
since Jan 2007
Apr 17th, 2007
0

Re: How to print tables in SQL Server 2005

I think you wil need to produce a report then, either by writing an web or local application or by using a report generator (crystal reports maybe?)
Moderator
Featured Poster
Reputation Points: 1800
Solved Threads: 575
Moderator
jbennet is offline Offline
16,534 posts
since Apr 2005
Apr 17th, 2007
1

Re: How to print tables in SQL Server 2005

In Sql Server Management Studio, expand databases, right click your database and choose tasks -> Export. In the first wizard page choose the source (this should already be the databse you just right clicked), click next. In the destination drop down choose Microsoft Excel, browse to a folder and type a filename, check the box 'First row has column names' click next. Choose the first option 'Copy data from one or more tables or views' click next. Select all the tables and click next, check the box 'Execute immediately' click next, click finish.
Reputation Points: 262
Solved Threads: 68
Veteran Poster
hollystyles is offline Offline
1,181 posts
since Feb 2005
Apr 17th, 2007
0

Re: How to print tables in SQL Server 2005

You can create a view to get the data you want and the import it into excel. The "Import External Data" is in the Data menu, and is wizard based, so it's pretty easy.

If your data changes, all you have to do is refresh your excel sheet and you get updated data as well.
Reputation Points: 12
Solved Threads: 2
Junior Poster
M_K_Higa is offline Offline
102 posts
since Sep 2006
Apr 17th, 2007
0

Re: How to print tables in SQL Server 2005

Thanks to everybody for the responses. I am not much of a programmer so I can not create an application to produce the reports or make one with existing software, but importing and printing the tables in excel using "Import External Data" was straightforward and quite easy. Thanks.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
quiptro is offline Offline
19 posts
since Jan 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in MS SQL Forum Timeline: How to connect queries from SQL Server 2005 to VB.Net Windows application
Next Thread in MS SQL Forum Timeline: SQL Permissions





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC