Csv export settings in Exporting Event

Stimulsoft Reports.Silverlight discussion
Locked
mriggall
Posts: 57
Joined: Mon May 07, 2012 7:41 pm
Location: Melbourne

Csv export settings in Exporting Event

Post 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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Csv export settings in Exporting Event

Post 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.
mriggall
Posts: 57
Joined: Mon May 07, 2012 7:41 pm
Location: Melbourne

Re: Csv export settings in Exporting Event

Post 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
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Csv export settings in Exporting Event

Post 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.
mriggall
Posts: 57
Joined: Mon May 07, 2012 7:41 pm
Location: Melbourne

Re: Csv export settings in Exporting Event

Post 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
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: Csv export settings in Exporting Event

Post by Alex K. »

Hello,

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

Thank you.
Locked