Crystal Reports in .NET: export supreport

Joined
Nov 9, 2006
Messages
1
Reaction score
0
Hallo everyone,

I have crystal reports in a web application. The reports are displayed correctly and the subreports as wel. I also want to be able to export de reports.

To do so I have used an own export button and a dropdownlist in order to select the export format. This also works fine.

My problem is that when I browse to a subreport within the report and then click the export button, the mainreport will be exported and not the currently visible subreport.

This is my code:

PHP:
 Protected Sub btExport_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btExport.Click
 
 		   Dim oRapportDocument As ReportDocument = LaadRapport()
 
 			' Declare variables and get the export options.
 			Dim exportOpts As ExportOptions = oRapportDocument.ExportOptions
 
 			Select Case LCase(cmbExport.SelectedValue)
 
 				Case "pdf"
 
 					Dim pdfFormatOpts As New PdfRtfWordFormatOptions()
 
 					' Set the pdf format options
 					pdfFormatOpts.UsePageRange = False
 
 					exportOpts.FormatOptions = pdfFormatOpts
 					exportOpts.ExportFormatType = ExportFormatType.PortableDocFormat
 
 				Case "excel"
 					.....
 				Case "exceldataonly"
 					......
 				Case "word"
 					.......
 				Case "rtf"
 					......
 			End Select
 
 			exportOpts.ExportDestinationType = ExportDestinationType.NoDestination
 
 			oRapportDocument.ExportToHttpResponse(exportOpts, Response, True, "Exported Rapport")
 
 		End Sub

In LaadRapport() a new report document will be created. And I guess that this is actually the problem. I don't want to export the whole new report but my selected subreport. But I don't know how to do that.

Does anybody have an idea?

Thanx in advance!
jennie
 
Joined
Oct 8, 2008
Messages
1
Reaction score
0
export Sub report

Hey!
Did you get an answer for your issue?
I've the same one. I am not able to export subreport
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top