Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>From what I was able to find, you could try to create your own export button option, removing the given button option and adding your own to the asp page. You would need to start by dragging the button onto the page and double clicking it to auto generate the code. From there add the code</p> <pre><code>crystalReportViewer1.ExportReport () </code></pre> <p>Once this code is in it will use the default settings for the export options, however if you want to change the export options within that button then you have to manually code it.</p> <pre><code>' Declare variables and get the export options. Dim exportOpts As New ExportOptions() Dim diskOpts As New DiskFileDestinationOptions() Dim excelFormatOpts As New ExcelFormatOptions() exportOpts = Report.ExportOptions ' Set the excel format options. excelFormatOpts.ExcelTabHasColumnHeadings = true exportOpts.ExportFormatType = ExportFormatType.Excel exportOpts.FormatOptions = excelFormatOpts ' Set the export format. exportOpts.ExportFormatType = ExportFormatType.Excel exportOpts.ExportDestinationType = ExportDestinationType.DiskFile ' Set the disk file options. diskOpts.DiskFileName = fileName exportOpts.DestinationOptions = diskOpts Report.Export() </code></pre> <p><a href="http://msdn.microsoft.com/en-us/library/aa288404%28VS.71%29.aspx" rel="nofollow noreferrer">MSDN SITE</a></p> <p>This link gives you the same code posted above. It show how to do it in Visual Basic code. therefor in your aspx.vb code you would have to manually enter the the types of formats you want. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload