Page 1 of 1

UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Mon Feb 02, 2015 10:36 am
by shyam.pundkar
Hi,

I want to disable the UsePageHeadersAndFooters check box of
stiReportViewer.InvokeReportSaveWord2007();
Capture.PNG
Capture.PNG (9 KiB) Viewed 6450 times
The reason for that is the exported file gets incorrect formatting if this option is used. If I leave it unchecked then the file gets exported correctly.
I checked below link and found that its by design that some changes happens when we check that check box. So for safer side I want the dialog box UsePageHeadersAndFooters unchecked and disabled.

http://www.stimulsoft.com/en/documentat ... 7_2010.htm
-If the checkbox Use Page Headers and Footers is on, it should be taken into consideration that, in this case, the height of the lines will be minimum allowable.


Could you please let me know how to do that?

Thanks
Shyam

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Mon Feb 02, 2015 12:45 pm
by HighAley
Hello.

Unfortunately, it's impossible to disable the UsePageHeadersAndFooters option in export dialog.
But you could change the settings in ReportExport event.
It was added in one of our latest builds.

Thank you.

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Tue Feb 03, 2015 8:02 am
by shyam.pundkar
Hi,

Could you please let me know in which release onwards I can find The ReportExport event?
I tried in 2014.3 but could not find it.
It would of great help if you can demonstrate some code to disable UsePageHeadersAndFooters check box.

Please note that we don't want to do away with the setting dialog completely. We just want to control the UsePageHeadersAndFooters check box. because once set it resets the height of line to minimum allowable thus making the exported word file different that the report that is visible on reportviewer.

Thanks
Shyam

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Wed Feb 04, 2015 6:34 am
by Alex K.
Hello,

Please check the last buil Stimulsoft Reports.Silverlight 2014.3.7 from 2015.01.30

Thank you.

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Tue Feb 24, 2015 9:27 am
by shyam.pundkar
Dear Aleksey

Can you tell me what following options does?

StiOptions.Export.Word2007.LineHeightExactly = true;
StiOptions.Export.Word2007.LineHeightExactlyForPHFMode = true;

I tried it for word export but I did not see any change in the exported document.

Thanks
Shyam

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Tue Feb 24, 2015 11:52 am
by HighAley
Hello.

Reports are exported to Word in Table mode.
This options specifies settings of Row height like on the image. If it is true, then the height will be set exactly, if it is false, then the row will set at least specified height.
change-row-height.jpg
change-row-height.jpg (38.27 KiB) Viewed 6390 times
Thank you.

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Wed Feb 25, 2015 4:32 am
by shyam.pundkar
At below link
http://www.stimulsoft.com/en/documentat ... 7_2010.htm

its mentioned:
Notice: If the checkbox Use Page Headers and Footers is on, it should be taken into consideration that, in this case, the height of the lines will be minimum allowable.

Now if I check UsePageHeadersAndFooters and then set
StiOptions.Export.Word2007.LineHeightExactly = true;
StiOptions.Export.Word2007.LineHeightExactlyForPHFMode = true;
in my code then the height of line should not change.... but its still changes the row height to minimum and that changes the formatting of the report.

My understanding was that these Options should be there to override some default behaviour, in this case it the row height, but its is not.
Can you please let me know does this options can override row hight settings when using UsePageHeadersAndFooters ?

Thanks

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Posted: Wed Feb 25, 2015 6:11 am
by HighAley
Hello.

Let me explain how the Row settings work in Word.
You could see the difference if the text is not fit in a cell.
Here is a sample report template, which we exported with three settings.
Report.mrt
(20.31 KiB) Downloaded 609 times
1. The Use Page Headers and Footers setting is false. The LineHeightExactly setting is true by default. The cells do not grow in height.
Report.docx
(10.18 KiB) Downloaded 608 times
2. The Use Page Headers and Footers setting is true. The LineHeightExactlyForPHFMode setting is false by default. The cells grow in height. This is noticed in our manual.
Report2.docx
(7.37 KiB) Downloaded 702 times
3. The Use Page Headers and Footers setting is false. The LineHeightExactlyForPHFMode setting is true. The cells do not grow in height.
Report3.docx
(7.4 KiB) Downloaded 677 times
We guess that you understand how it works now.

Thank you.