Direct printouts to different printers. 
Author Message
 Direct printouts to different printers.

Hi,
Anyone with ideas on how to print out Crystal Reports to spesific printers
based on data in an SQL Table. How do I get the printer information from
ControlPanel into VB5? I want to get all the printerinformation from the
ControlPanel, store it on SQL-Server and use it to direct printouts based on
criterias made by the user.
Any ideas on ActiveX's, API's or whatever are welcome.

thanx

geir



Sun, 25 Feb 2001 03:00:00 GMT  
 Direct printouts to different printers.
Hi Gier

Quote:

>Hi,
>Anyone with ideas on how to print out Crystal reports to spesific printers
>based on data in an SQL Table. How do I get the printer information from
>ControlPanel into VB5? I want to get all the printerinformation from the
>ControlPanel, store it on SQL-Server and use it to direct printouts based
on
>criterias made by the user.
>Any ideas on ActiveX's, API's or whatever are welcome.

>thanx

>geir

You can do like this :

       Dim perrtext as stiring
       Dim found as boolean
       Dim printrep as string

       For Each x In Printers
          perrtext = perrtext & x.DeviceName & Chr(13)
          If UCase(Rep_prn) = UCase(x.DeviceName) Then
             Set Printer = x
             found = True
          End If
       Next x
       If found = False Then
          Print_Rep = "Printer could not be found on the server. Printers on
server are " & Chr(13) & perrtext
          Exit Function
       End If

       crdevmode.dmDeviceName = Trim(Printer.DeviceName)
       crdevmode.dmSpecVersion = &H320
       crdevmode.dmSize = 68
       result% = PESelectPrinter(jobnum%, Printer.DriverName,
Printer.DeviceName, Printer.Port, crdevmode)

Best regards
J?rgen Vendorf



Sun, 25 Feb 2001 03:00:00 GMT  
 Direct printouts to different printers.
Geir,
    If you use the printer method in VB, more info can be found in the help
file, use the device name property which is the name of the printer on your
system, or use the driver name which is the name of the driver on your


Tim Reed



Sat, 03 Mar 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Printout is different on different printer

2. printout different on every printer?

3. Directing a Crystal report to a printer other than the default printer

4. Directing a Crystal report to a printer other than the default printer

5. Directing a Crystal report to a printer other than the default printer

6. Report orientation different when sent to different printers.

7. cr6 prof - different printers = different results

8. PrintOut, Checking if PrintQue to printer is done

9. Change Color mode of Printer for printout of a word document

10. How to deal with printer margins/printable area for different printers

11. how to use remote printer with DCOM printout

12. Report.PrintOut - Printer.Orientation is ignored

 

 
Powered by phpBB® Forum Software