• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 184
  • Last Modified:

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

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
jstoner49
Asked:
jstoner49
1 Solution
 
mikepjCommented:
Can you provide some code showing the trouble?  That should work.
0
 
jstoner49Author Commented:
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
 
mikepjCommented:
The Print() method parameter is the document title.  I wonder if this causes your printer driver to do something strange.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
jstoner49Author Commented:
if I don't use (print.text) I get blank paper on the local printer. Print.text is a tmemo.
0
 
mikepjCommented:
You have something odd going on.  Update your printer drivers.  I have previously done exactly what you have done and it worked great.
0
 
jstoner49Author Commented:
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
 
jstoner49Author Commented:
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
 
mikepjCommented:
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
 
jstoner49Author Commented:
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
 
CleanupPingCommented:
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
 
Lukasz LachCommented:
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
 
Computer101Commented:
PAQed, with points refunded (200)

Computer101
E-E Admin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now