Page 1 of 1

Csv export settings in Exporting Event

Posted: Wed Jul 08, 2015 7:14 am
by mriggall
Hi Aleksey

I have come across a number of posts that talk about how to modify the SkipColumnHeaders property in the report code, but I need to be able to do it within the Exporting (or other) event of the Report.

I have tried to insert the following code into the Exporting event, but it generates an error when I run the report:

this.Export.StiCsvExportSettings.SkipColumnHeaders = true

I can't modify the report code (we don't provide the report code to our end-users to modify, they only have access to the visual designer) so need to be able to modify this particular setting within an event.

can you help?

thanks

Matt

Re: Csv export settings in Exporting Event

Posted: Wed Jul 08, 2015 2:18 pm
by HighAley
Hello, Matt.

It's impossible to change export settings in any event of the report.
It's possible to do before export from code only:

Code: Select all

            StiCsvExportSettings es = new StiCsvExportSettings();
            es.SkipColumnHeaders = true;
            yourReport.ExportDocument(StiExportFormat.Csv, yourStream, es);
Do you need to set the SkipColumnHeaders whatever user select in export settings dialog?

Thank you.

Re: Csv export settings in Exporting Event

Posted: Wed Jul 08, 2015 10:21 pm
by mriggall
Hi Aleksey

Yes I need to disable column headers even if the user has it ticked on in their export settings.

Unfortunately changing the setting in code means we have to issue a patch for our software, so I was hoping I could do it in the report design somehow.

thanks for your help though.

regards

Matt

Re: Csv export settings in Exporting Event

Posted: Thu Jul 09, 2015 11:27 am
by HighAley
Hello, Matt.

Unfortunately, it's impossible to set export settings in report.
What viewer do you use? Maybe it's better to hide export settings?

Thank you.

Re: Csv export settings in Exporting Event

Posted: Thu Jul 09, 2015 12:36 pm
by mriggall
Hi Aleksey

Thanks anyway, we will just issue a patch to our software so we can turn the setting off in code.

thanks again

Matt

Re: Csv export settings in Exporting Event

Posted: Fri Jul 10, 2015 10:20 am
by Alex K.
Hello,

Ok.
Let us know if you need any additional help.

Thank you.