Hi
I am trying to print Query Result directly to the printer from Client
machine. I managed to do this on Server machine. Where I had written SP whic
h
accepts SQL as parameter and using osql and xp_cmdShell command I am
outputting CSV file to printer. I want to do same from client machine but I
want print out should get printed on client printer not on Server.
Any ideas or suggestions'
Many thanks in advance.
Regards,
Santoshxp_cmdshell is executed on the server machine, which has no knowledge of the
client who submitted
the SQL command. Perhaps you can specify the printer name using UNC naming s
o the print is done on
the server machine, but the destination is specified as the client?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Santosh" <Santosh@.discussions.microsoft.com> wrote in message
news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
> Hi
> I am trying to print Query Result directly to the printer from Client
> machine. I managed to do this on Server machine. Where I had written SP wh
ich
> accepts SQL as parameter and using osql and xp_cmdShell command I am
> outputting CSV file to printer. I want to do same from client machine but
I
> want print out should get printed on client printer not on Server.
> Any ideas or suggestions'
> Many thanks in advance.
> Regards,
> Santosh
>|||Thanks Tibor, yes what you are suggesting, makes sense.
But I feel it will be better if I drop this idea and look for some different
option. Because if we want to specify UNC naming for printer. I need to make
printer as shared and need to give permissions so it can be accessible from
server by other users. Since printers are getting cheaper and cheaper, almos
t
everyone at client-side got there own printers, so I doubt if client admin
will accept this solution.
"Tibor Karaszi" wrote:
> xp_cmdshell is executed on the server machine, which has no knowledge of t
he client who submitted
> the SQL command. Perhaps you can specify the printer name using UNC naming
so the print is done on
> the server machine, but the destination is specified as the client?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Santosh" <Santosh@.discussions.microsoft.com> wrote in message
> news:A37189CF-9AFE-403A-97FC-2586C96C275B@.microsoft.com...
>
>|||I agree with your assessment. Can you do the printing from the client app (w
hich I assume is running
on the client machine already)?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...[vbcol=seagreen]
> Thanks Tibor, yes what you are suggesting, makes sense.
> But I feel it will be better if I drop this idea and look for some differe
nt
> option. Because if we want to specify UNC naming for printer. I need to ma
ke
> printer as shared and need to give permissions so it can be accessible fro
m
> server by other users. Since printers are getting cheaper and cheaper, alm
ost
> everyone at client-side got there own printers, so I doubt if client admin
> will accept this solution.
>
>
> "Tibor Karaszi" wrote:
>|||Yup I can Print Crystal reports on local client printer through client app.
Now I have written small code in Vb.net which accepts SQL from client PC and
prints result in CSV format on local client printer.
"Tibor Karaszi" wrote:
> I agree with your assessment. Can you do the printing from the client app
(which I assume is running
> on the client machine already)?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "sansaw80" <sansaw80@.discussions.microsoft.com> wrote in message
> news:E7FB20CE-CDA7-4334-BA6F-AEAEDA694852@.microsoft.com...
>
>