I used code below to display and print crystal report, it works fine.
Now, new report has a sub report. How to add some code to works with?
Rpt.SetDataSource(myDs)
Rpt.Refresh()
ExpOptions.ExportFormatType = ExportFormatType.PortableDocFormat
ExpOptions.FormatOptions = New PdfRtfWordFormatOptions
Dim req As New ExportRequestContext
req.ExportInfo = ExpOptions
Dim s As Stream
s = Rpt.FormatEngine.ExportToStream(req)
Response.ClearHeaders()
Response.ClearContent()
Response.ContentType = "application/pdf"
Dim buffer(s.Length) As Byte
s.Read(buffer, 0, Int(s.Length))
Response.BinaryWrite(buffer)
Response.End()
Now, new report has a sub report. How to add some code to works with?
Rpt.SetDataSource(myDs)
Rpt.Refresh()
ExpOptions.ExportFormatType = ExportFormatType.PortableDocFormat
ExpOptions.FormatOptions = New PdfRtfWordFormatOptions
Dim req As New ExportRequestContext
req.ExportInfo = ExpOptions
Dim s As Stream
s = Rpt.FormatEngine.ExportToStream(req)
Response.ClearHeaders()
Response.ClearContent()
Response.ContentType = "application/pdf"
Dim buffer(s.Length) As Byte
s.Read(buffer, 0, Int(s.Length))
Response.BinaryWrite(buffer)
Response.End()