Report export to Word-set Row height from Exact to At least

Stimulsoft Reports.NET discussion
Post Reply
tomislav.krnjak
Posts: 8
Joined: Wed Sep 20, 2017 8:05 am
Location: Zagreb, Croatia

Report export to Word-set Row height from Exact to At least

Post by tomislav.krnjak »

Hello,
report export to Word (2007/2013) format, all text is exported in table mode, with property Row height = Exactly.
Word Table Properties:
Exactly.png
Exactly.png (6.23 KiB) Viewed 3127 times
Is there an export option for setting all rows in the table with property Row height = At least (as in picture)?
Word Table Properties:
At_least.png
At_least.png (6.28 KiB) Viewed 3127 times
Height of every row is (must be) different because it depends of object height in report.

I ask that because when editing that exported report, users must be aware when new text goes in new/next line, the bottom text will not move, so they must move row bottom line in order to "create" new line. It would be better if the bottom table line of that row automatically goes down like in property Row height = At least, when typing new (additional) text or ENTER (new line).
Thanks
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report export to Word-set Row height from Exact to At le

Post by HighAley »

Hello.

There is an option that you could use.

Code: Select all

StiOptions.Export.Word.LineHeightExactly = false;

Or you could enable the Use Page Headers and Footers export option.

Thank you.
tomislav.krnjak
Posts: 8
Joined: Wed Sep 20, 2017 8:05 am
Location: Zagreb, Croatia

Re: Report export to Word-set Row height from Exact to At le

Post by tomislav.krnjak »

Hi,
i have tested with
StiOptions.Export.Word.LineHeightExactly = false;
and it didn't worked, but with
StiOptions.Export.Word2007.LineHeightExactly = false;
it worked.
Thank you. :)
tomislav.krnjak
Posts: 8
Joined: Wed Sep 20, 2017 8:05 am
Location: Zagreb, Croatia

Re: Report export to Word-set Row height from Exact to At le

Post by tomislav.krnjak »

Hi,
I have additional question,
for Microsoft Word File - Export Settings, setting/property Use Page Headers and Footers, is there a code option that I can use (StiOptions.Export. ... something) ?

Thanks
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report export to Word-set Row height from Exact to At le

Post by HighAley »

Hello.

You could set this setting using StiWord2007ExportSettings.UsePageHeadersAndFooters.

Thank you.
tomislav.krnjak
Posts: 8
Joined: Wed Sep 20, 2017 8:05 am
Location: Zagreb, Croatia

Re: Report export to Word-set Row height from Exact to At le

Post by tomislav.krnjak »

Hello,
when using setting
StiWord2007ExportSettings.UsePageHeadersAndFooters = true;
i got error
"The name 'StiWord2007ExportSettings' does not exist in the current context"

I am using setting in Exporting event (the same event as for StiOptions.Export.Word2007.LineHeightExactly = false; ).

What am I doing wrong?
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Report export to Word-set Row height from Exact to At le

Post by HighAley »

Hello.

This option works for exporting from code.
It's impossible to change these settings in the Exporting event.

You could try to use the StiOptions.Engine.GlobalEvents.ProcessExport global event to handle these settings.

Thank you.
Post Reply