Scroll

Change the File Name of an Export using External Interface

If you are saving scheduled reports to a repository, the file name is a GUID by default. By utilizing the External Interface method, ScheduledReportExecutionComplete(), you can easily customize the export file name.

In the example below, we are changing the export file name to reflect the report name plus the current date/time. 

Code:

public static void ScheduledReportExecutionComplete(string companyId, string userId, string reportName, string exportFileName, int statusCode, string statusMsg)
        {
            string path1 = exportFileName;
            string path2 = @"C:\Program Files\Exago\ExagoScheduler_v2015.1\SaveRepository\" + reportName + DateTime.Now.ToString(@"-yyyy-MM-dd-ss-HH-mm-ss") + ".xls";

            File.Move(path1, path2);

        }

Result:


Hidden Article Information

Article Author
Ayleesa
created 2016-02-17 20:09:59 UTC
updated 2017-06-19 20:35:45 UTC

Labels
no labels yet!
Have more questions? Submit a request