Page 1 of 2

UseOnePageHeaderAndFooter

Posted: Tue Jun 04, 2019 6:39 pm
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.

Re: UseOnePageHeaderAndFooter

Posted: Wed Jun 05, 2019 12:13 pm
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.

Re: UseOnePageHeaderAndFooter

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

Re: UseOnePageHeaderAndFooter

Posted: Thu Jun 06, 2019 10:12 pm
by Lech Kulikowski
Hello,

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

Thank you.

Re: UseOnePageHeaderAndFooter

Posted: Thu Jun 06, 2019 10:45 pm
by Leandro Borges
Hello.

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

Thank you.

Re: UseOnePageHeaderAndFooter

Posted: Fri Jun 07, 2019 7:12 am
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.

Re: UseOnePageHeaderAndFooter

Posted: Fri Jun 07, 2019 12:42 pm
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.

Re: UseOnePageHeaderAndFooter

Posted: Mon Jun 10, 2019 7:41 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: UseOnePageHeaderAndFooter

Posted: Tue Jun 11, 2019 9:59 pm
by Leandro Borges
Hello.

An example is attached.

Thank you.

Re: UseOnePageHeaderAndFooter

Posted: Wed Jun 12, 2019 5:55 pm
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.