RWS
Mar 22nd, 2006, 11:20 AM
I have a Crystal Report that I wanto to print from VB.net. I was able to do that with no problem until I added a subreport to the main report. The subreport is NOT a standalone report. The code below is what I used to print the report prior to adding the subreport.
ord.Fill(ords)
Dim crdoc As New ReportDocument
crdoc.Load("C:\QBSautoproj\Orders.rpt")
crdoc.SetDataSource(ords)
Try
crdoc.PrintToPrinter(1, True, 0, 0)
Catch ex As Exception
MsgBox(ex.ToString)After adding the subreport this fails on one of the fields of the subreport. Do I have to somehow include that in the code as another report?
Thanks,
Russ
ord.Fill(ords)
Dim crdoc As New ReportDocument
crdoc.Load("C:\QBSautoproj\Orders.rpt")
crdoc.SetDataSource(ords)
Try
crdoc.PrintToPrinter(1, True, 0, 0)
Catch ex As Exception
MsgBox(ex.ToString)After adding the subreport this fails on one of the fields of the subreport. Do I have to somehow include that in the code as another report?
Thanks,
Russ