Page 1 of 1

Is there any way to customize file name in export dialog?

Posted: Thu Aug 25, 2011 4:02 pm
by vitaliy.urazov
Hello!

Currently export dialog use report template name to save file in any formats. I'd like to suggest users custom name of the file to export, for instance, name contains current time. So, is there any way to customize file name in export dialog?

Thanks.

Is there any way to customize file name in export dialog?

Posted: Fri Aug 26, 2011 5:43 am
by Vladimir
Hello,

For this you can use the StiViewerEvent.START_EXPORT event of the StiViewerFx component and reportFile property of the StiReport component, for example:

Code: Select all

viewer.addEventListener(StiViewerEvent.START_EXPORT, onStaerExport);

... 

private function onRetrieveColumns(event: StiViewerEvent): void
{
    event.report.reportFile = event.report.reportName + StiDateTime.now.toString("YYYY-MM-dd");
}
Thank you.