Andy Green
asked on
Printing parameterised crystal reports direct to network printer
Hi Experts
I have a VB.net windows app written in VS 2005. I have a viewer page with a report on it, and it works great, users click on a datagrid print icon and the report pops up.
This is my code for that:
Private Sub cvwPatients_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cvwPatients.Load
Dim PR As New PatientReferraldb
Dim dt As DataTable = PR.SelectForPrint(valRefer rL_ID) 'send in report id
rdPatients.SetDataSource(d t)
With cvwPatients
.ReportSource = rdPatients
.ShowTextSearchButton = False
.ShowExportButton = False
.DisplayGroupTree = False
.ShowGroupTreeButton = False
End With
End Sub
What I need to be able to do is go to my database to get a list of records not printed, and loop through and print them without a print dialog popping up.
Any ideas on how I might do this, I've googled PrintToPrinter, and guess this is what I must be using, but I cant find any examples of selecting a network printer, or how to pass parameters similar to the way I've done it to display the report.
Andy
I have a VB.net windows app written in VS 2005. I have a viewer page with a report on it, and it works great, users click on a datagrid print icon and the report pops up.
This is my code for that:
Private Sub cvwPatients_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cvwPatients.Load
Dim PR As New PatientReferraldb
Dim dt As DataTable = PR.SelectForPrint(valRefer
rdPatients.SetDataSource(d
With cvwPatients
.ReportSource = rdPatients
.ShowTextSearchButton = False
.ShowExportButton = False
.DisplayGroupTree = False
.ShowGroupTreeButton = False
End With
End Sub
What I need to be able to do is go to my database to get a list of records not printed, and loop through and print them without a print dialog popping up.
Any ideas on how I might do this, I've googled PrintToPrinter, and guess this is what I must be using, but I cant find any examples of selecting a network printer, or how to pass parameters similar to the way I've done it to display the report.
Andy
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.