Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I have a task to modify the report so that before reload it will make a copy of itself as a backup into another folder. I have no idea now to start this. Do you think this can be done??
Thank you so much! But I cannot just make a simple backup. In fact, I have to save a copy at every reload because once the reload completed, the data in the report will be changed.
In the end I found this "EXECUTE" statement which solved my problem.
So what i do is at the beginning of the Load script Execute a command line to copy the report file. the script looks like this:
Let vReportFile = ' " '& DocumentPath( ) & ' " '; // This is report full path
Let vCopyReport = ' " C:\BackupFolder\' //the backup folder
& Left(DocumentName(),len(DocumentName())-4) // Remove the ".qvw"
& '_' & Date(now(), 'YYYY_MM_DD') // Put in the date
& '-' & time(now(), 'hhmmss') &'.qvw" '; //Put in the time and file extension
EXECUTE cmd.exe /c copy $(vReportFile) $(vCopyReport);
So far it's working fine on the server.
Hi,
PFA image,
Go to User preferences -> under save tab -> enable Use backup.
Hope this will solve your problem.
-- Regards,
Vishal Waghole
Setting -> User preferences -> under save tab -> then enable Use backup.
Thank you so much! But I cannot just make a simple backup. In fact, I have to save a copy at every reload because once the reload completed, the data in the report will be changed.
In the end I found this "EXECUTE" statement which solved my problem.
So what i do is at the beginning of the Load script Execute a command line to copy the report file. the script looks like this:
Let vReportFile = ' " '& DocumentPath( ) & ' " '; // This is report full path
Let vCopyReport = ' " C:\BackupFolder\' //the backup folder
& Left(DocumentName(),len(DocumentName())-4) // Remove the ".qvw"
& '_' & Date(now(), 'YYYY_MM_DD') // Put in the date
& '-' & time(now(), 'hhmmss') &'.qvw" '; //Put in the time and file extension
EXECUTE cmd.exe /c copy $(vReportFile) $(vCopyReport);
So far it's working fine on the server.