Working on .rdlc to print directly (without preview) (Reference: Print a ReportViewer Without Preview). I am able to print directly to printer without opening ReportViewer. I am stuck in a weird situation. The above mentioned solution works well in Windows 7 but generates an error "Some parameters or credentials have not been specified" in Windows 10. This error is generated on
ReportPageSettings reportPageSettings = report.GetDefaultPageSettings();
I have tested the same code that works on Windows 7. Migrating to Windows 10 generates this error.
I have tried 1)
Dim lrpt As New LocalReport()
lrpt.ReportEmbeddedResource = "POS-Rest.Invoice.rdlc"
Dim rds As New ReportDataSource("InvoiceDataSet", SelfDetailsBindingSource)
lrpt.DataSources.Add(rds)
lrpt.Refresh()
lrpt.ExecuteReportInCurrentAppDomain(System.Reflection.Assembly.GetExecutingAssembly().Evidence)
Dim rpt As New ReportPrintDocument(lrpt)
rpt.Print()
2)
Dim rpt As New ReportPrintDocument(Me.ReportViewer1.LocalReport)
rpt.Print()
Check the error screenshot !http://prntscr.com/nj4s49