Page 1 of 1

Save a few pages of a document

Posted: Fri Nov 02, 2007 9:55 am
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.

Save a few pages of a document

Posted: Fri Nov 02, 2007 11:04 am
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 ?

Save a few pages of a document

Posted: Fri Nov 02, 2007 11:18 am
by Guest
You can use your variant or remove unnecessary rendered pages: report.CompiledReport.RenderedPages.Remove(int startIndex, int endIndex);

Thank you.