Skip to Content
avatar image
Former Member

Problem setting PrintOptions.PrinterName with Crystal Reports for Visual Studio 2010 Service Pack 1

Using VB.Net 2010 SP1 and Crystal Report 13 SP2

Dim objReport As CrystalDecisions.CrystalReports.Engine.ReportDocument = New rpReport

objReport.PrintOptions.PrinterName = System.Drawing.Printing.PrinterSettings.InstalledPrinters(5)

objReport.SetDataSource(dsreport.Tables(0))

when i debug first system set printer name but after executing to set report data source, printer name set to empty, i try to set printer name but unable to set printer name after assigning data source

Can any one please help me?

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    May 14, 2012 at 09:09 AM

    Hi Syed,

    Go to Visual studio -> Crystal Report -> Project - Page Settings

    Remove the check over "no printer installed"

    I'm sorry for the translate but i've vs italian.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 16, 2014 at 12:35 PM

    Olha primeiro tens que listar as impressoras e escolher uma. Se usas o VB.NET aqui vai o procedimento para carregar as impressoras:

    For Each Printer In PrinterSettings.InstalledPrinters

    ComboBox1.Items.Add(Printer)

    Next

    podes fazer isso antes de carregar o crystal report.

    Ou para evitar obrigatoriedade de impressora abre o report no formato edital faça click com o botão direito do mouse e escolhe page setup "Configuração de pagina" e desactiva o Visto que tiver por cima do nome da impressora.

    Add comment
    10|10000 characters needed characters exceeded