Solved

I'm using Richedit.print but it will not print across a network

Posted on 2002-07-23
12
159 Views
Last Modified: 2010-04-04
I'm using the richedit.print because it word wraps during printing.  This feature works great to a local printer. But when I use the print dialog to select the printers, it list all of the printers on the network. I select the network printer and nothing happens, I wait for the Windows 2000 print window it never comes up.  I get no errors and nothing prints.

I need help.

Thanks Jim
0
Comment
Question by:jstoner49
12 Comments
 
LVL 2

Expert Comment

by:mikepj
ID: 7177674
Can you provide some code showing the trouble?  That should work.
0
 

Author Comment

by:jstoner49
ID: 7178859
Here is my code for printing. It prints fine to a local printer but it will not print the network printers.

procedure TForm1.Button20Click(Sender: TObject);
var
fprn: system.text;
I:integer;
Lcol: integer;
begin
      anquest;

    richedit1.Text:= print.Text;
 if printdialog1.Execute then
richedit1.Print(print.text);




end;
0
 
LVL 2

Expert Comment

by:mikepj
ID: 7178933
The Print() method parameter is the document title.  I wonder if this causes your printer driver to do something strange.
0
 

Author Comment

by:jstoner49
ID: 7178964
if I don't use (print.text) I get blank paper on the local printer. Print.text is a tmemo.
0
 
LVL 2

Expert Comment

by:mikepj
ID: 7178971
You have something odd going on.  Update your printer drivers.  I have previously done exactly what you have done and it worked great.
0
 

Author Comment

by:jstoner49
ID: 7178978
I'm using richedit.print because wordwrap on the printer.  
I have searching for something on several sites. One thing that keeps coming up is printerindex I'm still not sure how to write code with it.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:jstoner49
ID: 7178981
these are current printer drivers for win 2000.  When printing to win2000 it always prompts you to select a printer even when the program already has selected the specific printer.  When I run the program it never launches the win 2000 printer select window. I don't even get an error and the print job is not even spooled.
0
 
LVL 2

Expert Comment

by:mikepj
ID: 7178985
You can use it to directly read/control the printer selection.  In conjunction with Printers[PrinterIndex], you can see the name of the printer.  I'm sure much more is readily available.  I did a quick test and PrinterIndex is set directly by TPrinterDialog so you won't need it unless you're making this selection yourself.
0
 

Author Comment

by:jstoner49
ID: 7185165
I'm not sure why the richedit would not print to the network printer I'm using the generic code I found for printing tmemo this seems to work just fine.
0
 

Expert Comment

by:CleanupPing
ID: 9343005
jstoner49:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 5

Expert Comment

by:Lukasz Lach
ID: 9461499
jstoner49,
No comment has been added lately (18 days), so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:

RECOMMENDATION: Accept mikepj's answer http:#7178985 and Refund

Please leave any comments here within 7 days.

-- Please DO NOT accept this comment as an answer ! --

Thanks,

anAKiN
EE Cleanup Volunteer
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 9537815
PAQed, with points refunded (200)

Computer101
E-E Admin
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now