Problem with page break in export to Word 2007

Stimulsoft Reports.WEB discussion
Post Reply
kostandyan
Posts: 3
Joined: Wed Oct 03, 2012 8:04 am

Problem with page break in export to Word 2007

Post 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 ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with page break in export to Word 2007

Post by HighAley »

Hello.

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

Thank you.
kostandyan
Posts: 3
Joined: Wed Oct 03, 2012 8:04 am

Re: Problem with page break in export to Word 2007

Post by kostandyan »

Thanks for Your answer.
And one more question please. Where is the Word Export Settings ?
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Problem with page break in export to Word 2007

Post 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.
kostandyan
Posts: 3
Joined: Wed Oct 03, 2012 8:04 am

Re: Problem with page break in export to Word 2007

Post by kostandyan »

Working :)
Thanks !!!
Andrew
Posts: 4109
Joined: Fri Jun 09, 2006 3:58 am

Re: Problem with page break in export to Word 2007

Post by Andrew »

Hello,

Perfect!

Thank you.
Post Reply