Click here to Skip to main content
15,892,737 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hi,

I want to export the rdl file data to export file on the basis of two condition.
1.Export only 1st page
2.Export Full data.

I am able to export the full data but not able to export only 1st page data?
Is it possible to export only 1st page data to pdf??
Posted

1 solution

You need to pass the StartPage and EndPage settings in the DeviceInfo parameter of the Render method[^]:
C#
string deviceInfo = @"<DeviceInfo>
    <StartPage>1</StartPage>
    <EndPage>1</EndPage>
</DeviceInfo>";

string extension, mimeType, encoding;
Warning[] warnings;
string[] streamIds;

byte[] pdf = yourReport.Render("PDF", deviceInfo, out extension, out mimeType, out encoding, out warnings, out streamIds);
...

Passing Device Information Settings to Rendering Extensions[^]
PDF Device Information Settings[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900