Results 1 to 2 of 2

Thread: PrinterSettings issue with rdlc and Datamax printer for labels 4 wide continuous role

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2016
    Posts
    155

    PrinterSettings issue with rdlc and Datamax printer for labels 4 wide continuous role

    I have had 0 luck trying to get this to work. I can set margins and padding options on a 4 column rdlc report but can not get the thing to print the last column correctly on the last label. 1 thing I notice is that if I go over the 3.2" barrier on the report properties Width, then it prints vertical instead of horizontal and you can not control the Orientation at all based on the Width and Height. Another thing I noticed is when trying to set the default page settings to the correct paper size is not working. When you go into the page settings, it states custom instead of the correct size. Any help would be much appreciated since I have not been able to get this to work for years.

    Code:
    If layout = "105" Then '.75" x .25 label 4 across"
                With PrintPreview105.ReportViewer105
                    Dim ans As Integer = MessageBox.Show("Did you check the Datamax Printer for the correct stock?", "Question", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button2)
                    If ans <> 6 Then Exit Sub
                    .PrinterSettings.PrinterName = "\\GVL02\Datamax Label Printer" 'Datamax Printer DMX i-4604
                    temstr = .PrinterSettings.PrinterName
                    goodprinter = TestPrinter(temstr)
                    If goodprinter = "" Then
                        MessageBox.Show("Datamax Label Printer is not installed. Contact your Administrator.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
                        Exit Sub
                    Else
                        If temstr <> goodprinter Then
                            .PrinterSettings.PrinterName = goodprinter
                        End If
                    End If
    
                    .ProcessingMode = ProcessingMode.Local
                    .LocalReport.DataSources.Clear()
                    .LocalReport.DataSources.Add(RDS)
                    .SetDisplayMode(DisplayMode.PrintLayout)
                    'Set the paper
                    Try
                        .PrinterSettings.DefaultPageSettings.PaperSize = .PrinterSettings.PaperSizes(2)
                    Catch
                        MessageBox.Show("Datamax Label Printer needs to be setup. Check Paper sizes.", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
                    End Try
                    .ZoomMode = 2
                    .ZoomPercent = 150
                    .LocalReport.SetParameters(param1)
                    .LocalReport.SetParameters(param2)
                    .LocalReport.SetParameters(param3)
                    .LocalReport.SetParameters(param4)
                    .LocalReport.Refresh()
                End With
                'PrintPreview105.Show()
                PrintPreview105.ShowDialog()
            End If

  2. #2
    PowerPoster jdc2000's Avatar
    Join Date
    Oct 2001
    Location
    Idaho Falls, Idaho USA
    Posts
    2,393

    Re: PrinterSettings issue with rdlc and Datamax printer for labels 4 wide continuous

    Can you actually change the paper size in the Printer setup (not in VB) and get it to show the proper size, and save that setting?

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