[]
        
(Showing Draft Content)

C1.Ssrs.ReportSession.GetContent

GetContent Method

GetContent(int, int, ReportFormat, PageLayout, int?, int?, CancellationToken)

Generates report in specific format. startPageIndex and pageCount specify range of pages, set pageCount to 0 to request all pages of the report.

Declaration
public byte[] GetContent(int startPageIndex, int pageCount, ReportSession.ReportFormat format, PageLayout pageLayout, int? dpiX, int? dpiY, CancellationToken cancellationToken)
Parameters
Type Name Description
int startPageIndex

The first page of the report to render.

int pageCount

Count of pages to load, set this parameter to 0 to request all pages of the report, startPageIndex ignored in this case.

ReportSession.ReportFormat format

ReportSession.ReportFormat object specifies the report format.

PageLayout pageLayout

PageLayout object specifies the page settings, this parameter used only for PDF and IMAGE formats.

int? dpiX

Specifies print horizontal dpi, used only for EMF format, see PrintDpiX in SSRS help.

int? dpiY

Specifies print vertical dpi, used only for EMF format, see PrintDpiY in SSRS help.

CancellationToken cancellationToken

CancellationToken that can be used to cancel an action.

Returns
Type Description
byte[]

Array of bytes contains generated content, null if action was cancelled.

GetContent(string, string, CancellationToken)

Gets report content in specific format.

Declaration
public byte[] GetContent(string format, string deviceInfo, CancellationToken cancellationToken)
Parameters
Type Name Description
string format

Strings specifies report format "PDF", "IMAGE" etc.

string deviceInfo

DeviceInfo string specifies additional parameters.

CancellationToken cancellationToken

CancellationToken that can be used to cancel an action.

Returns
Type Description
byte[]

Array of bytes contains generated content.