UsePageHeadersAndFooters in InvokeReportSaveWord2007

Stimulsoft Reports.Silverlight discussion
Locked
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

UsePageHeadersAndFooters in InvokeReportSaveWord2007

Post by shyam.pundkar »

Hi,

I want to disable the UsePageHeadersAndFooters check box of
stiReportViewer.InvokeReportSaveWord2007();
Capture.PNG
Capture.PNG (9 KiB) Viewed 4263 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
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Post 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.
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Post by Alex K. »

Hello,

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

Thank you.
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

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

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Post 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 4203 times
Thank you.
shyam.pundkar
Posts: 56
Joined: Fri Feb 21, 2014 9:26 am

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

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

Re: UsePageHeadersAndFooters in InvokeReportSaveWord2007

Post 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 235 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 232 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 243 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 245 times
We guess that you understand how it works now.

Thank you.
Locked