Link to home
Start Free TrialLog in
Avatar of jsrams
jsrams

asked on

Print to printer directly from ASP.NET w/o Crystal Reports

Hi Team/ Gurus,

Is there any external tool available to achieve the Printing to a network printer from ASP.NET.  I don't want to use Crystal Reports as I cannot install this on a web server (shared).  

Second, I could store the network printer name and node in  a DB and call that to print.  I don't want to have the printer dialog to be shown.

The reason is: One user could print upto 50 labels to a zebra printer.  I don't want the user to print one each time.  Got me?  That's the issue here.

Thanks in advance.  It is very important and I need to take a decision.  SO, Any help or valuable suggestions would be much appreciated.  
Avatar of Jojo1771
Jojo1771

Ok, I dont know of a tool to do this, but I coded a web site that did something close to this.

Just some things to think about.

I installed all the network printers on my web server. (This was an intranet project)


I then made a asp.net page that read the web servers registry for all the printers and it let the users select which printer they wanted.

I stored thier prefrence in a database.

When they wanted to print somthing and hit the print button on my web form. I would genertate whatever data they wanted into a pdf.
I took thier printer info from the database and printed that document to the printer. Since it was installed on the server I could call the print function in code.
So to the user it was as if the printer was hooked to thier machine. But technically thier machine has nothing to do with it.

Just an idea.

Good luck.

Thanks,
Jojo1771
I am not going to pretend like it is easy to do, but it is possible to set up an ASP Page to automatically print to a specified printer. In my case I was always trying to print to the same printer every time, so there was no need to have the user select a printer. You could likely create your own list to have them choose from easily enough if they need to be able to choose, or do the database lookup like you mentioned.

Have a look at http://msdn2.microsoft.com/en-us/library/system.drawing.printing.printdocument.aspx

That lists some pretty good information on the print document class, let me know if that is what you are looking for.
Avatar of jsrams

ASKER

Hi ,

Thank you.  We are planning to create a DB that corresponds to the user, which has the printer name, network node name, type, etc.

So, is it possible to print the document based upon the user directly to the printer without opening up the print dialog box.  

There are two documents to be printed.

1) One on laserjet
2) Zebra Label printer via ZPL programming lang

Hope this helps.  Appreciate if you could provide any assistance, if there is any way we could do this.

Thanks, VP
ASKER CERTIFIED SOLUTION
Avatar of Xeavn
Xeavn

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't know if we were able to help the asker in this case, but since he hasn't returned or asked any more questions in this thread I recommend splitting the points between Jojo and I if Jojo has no objection to that.