Quantcast
Channel: VBForums - Reporting
Viewing all articles
Browse latest Browse all 594

Crystal report to pdf with sub report

$
0
0
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()

Viewing all articles
Browse latest Browse all 594

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>