Results 1 to 5 of 5

Thread: Default Printer For Crystal Reports

  1. #1

    Thread Starter
    Hyperactive Member nazeem_khan's Avatar
    Join Date
    Nov 2002
    Location
    India
    Posts
    305

    Default Printer For Crystal Reports

    How do i set a default printer for a cystal report to print from VB, that is created directly from the Crystal Report Software. I see whenever the crystal reports is open manually thru CR8.5 for printing, in the printer setup NO PRINTER is selected by default. How do i set the default printer for the reports in VB for printing?....

  2. #2
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    Printing

    If you use crystal 8.5 developer and u use the Active X designer to add reports u could do the following in code to show a printer dialogue and then select which ever printer you want.

    Make sure the the Crystal Reports 8.5 design and run time library is checked in your references in your vb project.

    use the following code to call the printer dialogue.

    vb code
    ----------

    CrystalReport1.PrinterSetup Me.hWnd

    ----------

    Hope thise helps.
    Do, or do not. There is no 'try'.

  3. #3

    Thread Starter
    Hyperactive Member nazeem_khan's Avatar
    Join Date
    Nov 2002
    Location
    India
    Posts
    305

    Re: Printing

    Originally posted by Joffies
    If you use crystal 8.5 developer and u use the Active X designer to add reports u could do the following in code to show a printer dialogue and then select which ever printer you want.

    Make sure the the Crystal Reports 8.5 design and run time library is checked in your references in your vb project.

    use the following code to call the printer dialogue.

    vb code
    ----------

    CrystalReport1.PrinterSetup Me.hWnd

    ----------

    Hope thise helps.

    ...But what i require is to set a printer as the default printer for printing..For this report doesnt require to show printer dialog box..is there any way to do that...

    ..one more thing..i have designed a report using CR8.5. This report uses the same tables but with different database name and compute name. I tried logging in with this but it is not printing unless i open it specifically using Cr8.5 and specifiy the diffrerent computer name and database name....how can i eliminate this problem...

  4. #4
    Lively Member Joffies's Avatar
    Join Date
    Aug 2002
    Location
    London
    Posts
    119

    Default Printer

    1. To check if you allow printing on your report in Crystal 8.5

    Go to the following menu in crystal

    File > Printer Setup > No Printer (check box)

    Always make sure that No Printer is not checked otherwise you will not be able to print your report. If the No printer is not checked then crystal will use the default printer installed to print out the report.

    If you want to specify a printer during run-time you will have to specify a printerdriver, printername and printerport in your code.

    [form.]Report.PrinterDriver [= DriverName$]

    For example:

    CrystalReport1.PrinterDriver = "Epson24.drv"

    [form.]Report.PrinterName[= PrinterName$]

    For example:

    CrystalReport1.PrinterName = "Epson LQ-850"

    «Specifies the Epson LQ-850 printer.»

    [form.]Report.PrinterPort[= PortName$]

    For example:

    CrystalReport1.PrinterPort= "LPT1"

    «Sets the printer port to LPT1.»

    If you have crystal 8.5 developer you could reference the developer help files for more details and examples.

    2. To solve the problem for your database name that have changed check out this link as might just solve your problem.

    http://support.crystaldecisions.com/...s/c2001289.asp
    Last edited by Joffies; Apr 15th, 2003 at 08:08 AM.
    Do, or do not. There is no 'try'.

  5. #5
    New Member
    Join Date
    Apr 2017
    Posts
    1

    Re: Printing

    Quote Originally Posted by Joffies View Post
    If you use crystal 8.5 developer and u use the Active X designer to add reports u could do the following in code to show a printer dialogue and then select which ever printer you want.

    Make sure the the Crystal Reports 8.5 design and run time library is checked in your references in your vb project.

    use the following code to call the printer dialogue.

    vb code
    ----------

    CrystalReport1.PrinterSetup Me.hWnd

    ----------

    Hope thise helps.

    Thanks. Above line help me lot to solve my problem.

    To change printer in crystal report

    Dim CrystalReport1 as CRAXDDRT.Report

    CrystalReport1.PrinterSetup Me.hWnd

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width