on 11-15-2016 10:10 AM
Hi Don,
I ran across a strange problem. Our customer uses a Canon iR3235/iR3245 PCL5e printer driver with 4 trays. Everything's running well except when selecting Drawer 4 (Id=264), the printer switches to Auto. The other trays are working well as they are standard-trays as upper or lower... (I think so)
The problem comes, when a formula Check is used between configuring the printer and printing.
Here a sample code:
With _crystalMainReport.PrintOptions
Using pd As System.Drawing.Printing.PrintDocument = New System.Drawing.Printing.PrintDocument()
pd.PrinterSettings.PrinterName = printerName
For Each ps As System.Drawing.Printing.PaperSource In pd.PrinterSettings.PaperSources
If ps.RawKind = .PaperSource Then
.CustomPaperSource = New System.Drawing.Printing.PaperSource()
.CustomPaperSource.SourceName = ps.SourceName.Trim
.CustomPaperSource.RawKind = ps.RawKind
Exit For
End If
Next
End Using
End With
' the problem code
_crystalMainReport.ReportClientDocument.DataDefinition.FormulaFields.Find("Test", CrFieldDisplayNameTypeEnum.crFieldDisplayNameName, CeLocale.ceLocaleUserDefault)
' Check
With _crystalMainReport.PrintOptions
Dim message As String = "PrinterSelectConfig" & vbCrLf &
" - Printername: " & .PrinterName & vbCrLf &
" - Duplex: " & .PrinterDuplex.ToString & vbCrLf &
" - Source: " & .PaperSource.ToString & vbCrLf
If .CustomPaperSource Is Nothing Then
message &= " RawKind: (not defined)" & vbCrLf
Else
message &= " RawKind: " & .CustomPaperSource.RawKind.ToString & " (" & .CustomPaperSource.SourceName & ")" & vbCrLf
End If
message &= " - Orientation: " & .PaperOrientation.ToString & vbCrLf &
" - Papersize: " & .PaperSize.ToString
MessageBox.Show(message, "Debug", MessageBoxButtons.OK, MessageBoxIcon.Information)
End With
When you comment out "FormulaFields.Find", it works well, RawKind is set. With the Find, CustomPaperSource becomes Nothing.
Both logics have nothing to do with each other, but seems nevertheless to have an influence....
BTW. I use SP18.
Patrick
Turned out to be a work flow problem, Set printer info and then change the report reset the printer properties.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Patrick,
That's odd I installed the printer and I don't see Tray 4 or one with that high of an ENUM, but after some configuring I now see it:
I'm on Windows 10, what OS are they using?
Can you get the config screen shots from that printer?
Can you verify the report? If something is wrong with their formula it's possible CR is simply resetting all changes
I believe you have my e-mail, send me the report so I can check it, since this new piece of @#$# no longer allows you to attached renamed RPT file.
Don
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.