[]
Exports the specified page range of the currently loaded report to the specified file by using the specified export filter.
public void Export(IDocumentExport filter, FileInfo file)
Type | Name | Description |
---|---|---|
IDocumentExport | filter | The export filter to use. |
FileInfo | file | The file to export to. |
An example of export report to pdf file:
var pdfExport = new PdfExport();
var exportFile = new FileInfo("path/to/your/report.pdf");
viewer.Export(pdfExport, exportFile);
Exports the specified page range of the currently loaded report to the specified file by using the specified export filter.
public void Export(IDocumentExport filter, FileInfo file, string pageRange)
Type | Name | Description |
---|---|---|
IDocumentExport | filter | The export filter to use. |
FileInfo | file | The file to export to. |
string | pageRange | The page range to export. The format of the range is a comma-separated list of page numbers "2,5,7" or page ranges "3-5". If an empty string is provided, the entire report is exported. |
An example of export report to pdf file:
var pdfExport = new PdfExport();
var exportFile = new FileInfo("path/to/your/report.pdf");
viewer.Export(pdfExport, exportFile, "1,3,5");
Exports the specified page range of the currently loaded report to the specified stream by using the specified export filter.
public void Export(IDocumentExport filter, Stream stream)
Type | Name | Description |
---|---|---|
IDocumentExport | filter | The export filter to use. |
Stream | stream | The stream to export to. |
An example of export report to pdf file:
using (var stream = new MemoryStream())
{
var pdfExport = new PdfExport();
viewer.Export(pdfExport, stream);
// Use the stream containing the exported report
}
Exports the specified page range of the currently loaded report to the specified stream by using the specified export filter.
public void Export(IDocumentExport filter, Stream stream, string pageRange)
Type | Name | Description |
---|---|---|
IDocumentExport | filter | The export filter to use. |
Stream | stream | The stream to export to. |
string | pageRange | The page range to export. The format of the range is a comma-separated list of page numbers "2,5,7" or page ranges "3-5". If an empty string is provided, the entire report is exported. |
An example of export report to pdf file:
using (var memoryStream = new MemoryStream())
{
var pdfExport = new PdfExport();
viewer.Export(pdfExport, memoryStream, "1,5");
// The memoryStream contains the first and the fifth pages of the report exported as a PDF.
}