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

Stimulsoft Reports.Flex discussion
Locked
vitaliy.urazov
Posts: 47
Joined: Thu Jul 14, 2011 6:09 pm

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

Post 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.
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

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

Post 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.
Locked