Urgent question - StiExcelExportSettings in code behind
-
- Posts: 13
- Joined: Wed Dec 18, 2013 1:03 pm
Urgent question - StiExcelExportSettings in code behind
I am trying to set
UseOnePageHeaderAndFooter = true
so each time, when user click on export to excel, this option will be checked by default.
I am using :
StiExcelExportSettings d = new StiExcelExportSettings();
d.UseOnePageHeaderAndFooter = true;
but it doesn't work.
How i should do that ??
Thanks
Jalal
UseOnePageHeaderAndFooter = true
so each time, when user click on export to excel, this option will be checked by default.
I am using :
StiExcelExportSettings d = new StiExcelExportSettings();
d.UseOnePageHeaderAndFooter = true;
but it doesn't work.
How i should do that ??
Thanks
Jalal
Re: Urgent question - StiExcelExportSettings in code behind
Hello,
We couldn't reproduce this bug.
Please check the last prerelease build and let us know about the result.
Thank you.
We couldn't reproduce this bug.
Please check the last prerelease build and let us know about the result.
Thank you.
-
- Posts: 13
- Joined: Wed Dec 18, 2013 1:03 pm
Re: Urgent question - StiExcelExportSettings in code behind
Hello,
it is not a bug.
I am just asking how i can set UseOnePageHeaderAndFooter = true from code behind ?
Thanks
it is not a bug.
I am just asking how i can set UseOnePageHeaderAndFooter = true from code behind ?
Thanks
Re: Urgent question - StiExcelExportSettings in code behind
Hello,
Please try to use the following code:
Please try to use the following code:
Code: Select all
var sf = new System.Windows.Controls.SaveFileDialog();
if (sf.ShowDialog() == true)
{
var stream = sf.OpenFile();
var settings = new StiExcelExportSettings();
settings.UseOnePageHeaderAndFooter = true;
report.ExportDocument(StiExportFormat.Excel, stream, settings);
}
-
- Posts: 13
- Joined: Wed Dec 18, 2013 1:03 pm
Re: Urgent question - StiExcelExportSettings in code behind
Thanks Aleksey,
your code is ok and it works fine since i tried it before. But I don't want to use SaveFileDialog, i just want to use stimulsoft window that opens when press export to excel with UseOnePageHeaderAndFooter checked by default.
any way to do that ?
Jalal
your code is ok and it works fine since i tried it before. But I don't want to use SaveFileDialog, i just want to use stimulsoft window that opens when press export to excel with UseOnePageHeaderAndFooter checked by default.
any way to do that ?
Jalal
Re: Urgent question - StiExcelExportSettings in code behind
Hello.
In this case you could try to use next code:But it there will be any changes in our export forms this code may stop working.
Thank you.
In this case you could try to use next code:
Code: Select all
StiSettings.Set("StiExcelSetupForm", "UseOnePageHeaderAndFooter", false);
Thank you.
-
- Posts: 13
- Joined: Wed Dec 18, 2013 1:03 pm
Re: Urgent question - StiExcelExportSettings in code behind
Hello,
What you sent me doesn't work !
but the following code works fine :
StiSettings.Set("StiExcelExportSetupForm", "UseOnePageHeaderAndFooter", true);
Thanks
Jalal
What you sent me doesn't work !
but the following code works fine :
StiSettings.Set("StiExcelExportSetupForm", "UseOnePageHeaderAndFooter", true);
Thanks
Jalal
Re: Urgent question - StiExcelExportSettings in code behind
Hello,
From your last post I understand the issue is closed, right?
Thank you.
From your last post I understand the issue is closed, right?
Thank you.
-
- Posts: 13
- Joined: Wed Dec 18, 2013 1:03 pm
Re: Urgent question - StiExcelExportSettings in code behind
Hello,
Let us know if you need any additional help.
Let us know if you need any additional help.