Solved

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

Posted on 2002-07-23
12
164 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wininet read php file from internet issue 6 81
FMX StringGrid1->Canvas->FillRect Problem 3 127
How to debug For loops? 3 45
control image tags in a string ? 12 110
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 I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…

911 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