Page 1 of 1

Problem with page break in export to Word 2007

Posted: Wed Oct 03, 2012 8:14 am
by kostandyan
Hi
I have a report containing 3 pages
second page's content is shorter than page's height.
in viewer all looks good, but when i export report to word 2007
3-rd page comes under the second page, i need to start the 3-rd page content with new page.
How can i do this ?

Re: Problem with page break in export to Word 2007

Posted: Wed Oct 03, 2012 10:54 am
by HighAley
Hello.

Please, try to disable the Remove empty space at bottom of the page option in the Word Export Settings.

Thank you.

Re: Problem with page break in export to Word 2007

Posted: Wed Oct 03, 2012 12:46 pm
by kostandyan
Thanks for Your answer.
And one more question please. Where is the Word Export Settings ?

Re: Problem with page break in export to Word 2007

Posted: Thu Oct 04, 2012 11:15 am
by HighAley
Hello.

You need to add your own method, for example:

Code: Select all

        public void SetExportProperty(object sender, StiExportDataEventArgs args)
        {
            if (args.Settings is StiWord2007ExportSettings)
            {
                (args.Settings as StiWord2007ExportSettings).RemoveEmptySpaceAtBottom = false;
            }
        }
Then you can use this method in the PageLoad event:

Code: Select all

StiWebViewer1.ReportExport += new Stimulsoft.Report.Web.StiExportDataEventHandler(SetExportProperty);
or add property for the StiWebViewer on the aspx-page:

Code: Select all

<cc1:StiWebViewer ID="StiWebViewer1" runat="server" Width="800px" RenderMode="AjaxWithCache" OnReportExport="SetExportProperty"/>
If it will not help you, please, write us how do you export. If by code then send us this code.

Thank you.

Re: Problem with page break in export to Word 2007

Posted: Thu Oct 04, 2012 12:48 pm
by kostandyan
Working :)
Thanks !!!

Re: Problem with page break in export to Word 2007

Posted: Mon Oct 08, 2012 8:20 am
by Andrew
Hello,

Perfect!

Thank you.