UseOnePageHeaderAndFooter

Stimulsoft Reports.NET discussion
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

UseOnePageHeaderAndFooter

Post by Leandro Borges »

Hello.

I'm trying to use the "UseOnePageHeaderAndFooter = false" function in report events but I'm not getting it. Can you help me?
I used the following form:
StiOptions.Export.Excel.UseOnePageHeaderAndFooter = false;

Thank you.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski »

Hello,

Please clarify which product and version are you use?
Also, pease send us a sample report with test data which reproduces the issue for analysis.

Thank you.
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

Re: UseOnePageHeaderAndFooter

Post by Leandro Borges »

Hello.

I use the 2017.1.11 version. Stimulsoft.Reports.Net.
It turns out that in this release I'm not sure how to set the UseOnePageHeaderAndFooter function to false in report page events. How you do it?
Something similar was answered in this link: viewtopic.php?f=8&t=57144

Thank you.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski »

Hello,

You can open Events and set that option in the BeginRender event.

Thank you.
Attachments
Annotation 2019-06-07 001106.jpg
Annotation 2019-06-07 001106.jpg (110.94 KiB) Viewed 2651 times
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

Re: UseOnePageHeaderAndFooter

Post by Leandro Borges »

Hello.

Ok.
How do I use the UseOnePageHeaderAndFooter, ImageQuality and ImageResolution functions?

Thank you.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski »

Hello,

You can set these options from code or in the export menu dialog

Code: Select all

...
var exportSettings = new StiExcelExportSettings();
exportSettings.UseOnePageHeaderAndFooter = true;
exportSettings.ImageQuality = 0;
exportSettings.ImageResolution = 0;
report.ExportDocument(StiExportFormat.Excel, "file", exportSettings);
Thank you.
Attachments
Annotation 2019-06-07 090838.jpg
Annotation 2019-06-07 090838.jpg (45.24 KiB) Viewed 2642 times
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

Re: UseOnePageHeaderAndFooter

Post by Leandro Borges »

Hello.

I tried to use the code that passed me but it still did not work. The following error is occurring after inserting this line of code: report.ExportDocument(StiExportFormat.Excel, "file", exportSettings);

The error of compilation
The error of compilation is found in the 'BeginRender' event of the 'Report' component:
O nome 'report' não existe no contexto atual

Thank you.
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski »

Hello,

Please send us a sample which reproduces the issue for analysis.

Thank you.
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

Re: UseOnePageHeaderAndFooter

Post by Leandro Borges »

Hello.

An example is attached.

Thank you.
Attachments
MASTER.xls
(6 KiB) Downloaded 137 times
Example.mrt
(114.34 KiB) Downloaded 157 times
Lech Kulikowski
Posts: 6245
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski »

Hello,

The code which was provided in the previous post ad which you added in the BeginRender events, should be used in your project in Visual Studio, not directly in the report.

In the report's events, you should use StiOptions.

Thank you.
Post Reply