Save a few pages of a document

Stimulsoft Reports.NET discussion
Post Reply
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Save a few pages of a document

Post by Stéphane »

Hello,

I would like to save a few pages of a document in .mdc (or. mdz) format. I don't want to save all the pages of the document when I call the SaveDocument method of the StiReport class. Is it possible to do this by code ? When we export a document, we can select some pages, but, I didn't find how I can do it in the .mdc format.


Thanks in advance.
Cordially,
Kakone.
Stéphane
Posts: 74
Joined: Wed Dec 06, 2006 3:45 am
Location: Paris (France)

Save a few pages of a document

Post by Stéphane »

I found a solution... I create a new instance of the StiReport class where I import clones of rendered pages that I want to save. Then, I save this new document. It works, but is there a better solution ?
Guest
Posts: 182
Joined: Tue Jun 06, 2006 8:04 am

Save a few pages of a document

Post by Guest »

You can use your variant or remove unnecessary rendered pages: report.CompiledReport.RenderedPages.Remove(int startIndex, int endIndex);

Thank you.
Post Reply