-
Sep 27th, 2022, 08:25 AM
#1
Thread Starter
Addicted Member
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
-
Sep 27th, 2022, 05:21 PM
#2
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|