UseOnePageHeaderAndFooter

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

UseOnePageHeaderAndFooter

Post by Leandro Borges » Tue Jun 04, 2019 6:39 pm

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: 1871
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski » Wed Jun 05, 2019 12:13 pm

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 » Wed Jun 05, 2019 12:45 pm

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: 1871
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski » Thu Jun 06, 2019 10:12 pm

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 417 times
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

Re: UseOnePageHeaderAndFooter

Post by Leandro Borges » Thu Jun 06, 2019 10:45 pm

Hello.

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

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

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski » Fri Jun 07, 2019 7:12 am

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 408 times
Leandro Borges
Posts: 219
Joined: Tue Oct 27, 2015 4:19 pm

Re: UseOnePageHeaderAndFooter

Post by Leandro Borges » Fri Jun 07, 2019 12:42 pm

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: 1871
Joined: Tue Mar 20, 2018 5:34 am

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski » Mon Jun 10, 2019 7:41 am

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 » Tue Jun 11, 2019 9:59 pm

Hello.

An example is attached.

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

Re: UseOnePageHeaderAndFooter

Post by Lech Kulikowski » Wed Jun 12, 2019 5:55 pm

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