Well I'd go into Query Analyzer(MS SQL program) which is where I've done my printing.
Open Query Analyzer, then connect using the same settings you would in EntManager.
Select the correct database in the dropdown.
Type: SELECT * FROM [tablename]
You can view result in text or grid (toolbar). You can print directly from either but Grid will let you copy and paste into excel which you can format allot better(ctl+A, ctl+C, ctl+V).
When I use Query Analyzer and run my query in datagrid format, the print icon is disabled! Why does this happen? Thus I can't print from there.
I also copy all and then past my data onto Excel, but the string data loses its format by treating some numeric strings has numbers, i.e. changing to say 1.23423E+12.
Don't know what to do! Just want to print the results of my query...
Hi!
In Query Analiser:
You just need to set "Results in text", then run again the query, click in the results pane and then go to File\Print!
That's all. It works for me (I've tried it seconds ago).
If you want more control over the look n feel of your printout I suggest you use DTS to export your table directly into excel, then do the formatting in excel.
The simplest way to do this is open Enterprise Manager, browse to your table, right-click and choose export data. From there its a simple wizard where you can choose excel and a new file to export to.
If you have MS Access you could link to your SQL Server and then use one of the only decent things in Access - namely the Report Wizards, thus allowing you to format the output of the data exactly as you need.
But the simpliest way is definitely Query Analyser with results in Text rather than datagrid.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.