Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
abhijith28
Creator II
Creator II

Back up for Qlikview

Please help me with:

I need to create the back up file (.qvw) after each reload of qlikview document.

Is there any script? to achieve this.

5 Replies
agigliotti
Partner - Champion
Partner - Champion

what reload do you mean ? server side or with Qlikview Desktop ?

Frank_Hartmann
Master II
Master II

If you use QV Desktop you can use a macro to achieve this. You will just have to set up a trigger for "OnPostReload" (Settings-->DocumentProperties-->Trigger-->AddActions-->Add-->External-->RunMacro--> MacroName = SaveDocWithTimestamp) 

 

Sub SaveDocWithTimestamp 
    	set app = ActiveDocument.GetApplication    
    	Timestamp="-"&Year(now())&"-"&month(now())&"-"&day(now())&"--"&hour(now())&"-"&minute(now())&"-"&second(now()) 	
    	fname = ActiveDocument    	
	fname = right(Left(fname, InStr(fname, ".") - 1),4)						'Reportname in this example: Main.qvw--->4 characters, if you change Reportname you have to adjust the "4" according to the length of the Reportname		  	
    	ActiveDocument.SaveAs "C:\Users\root\Desktop\"&fname&"-Backup"&Timestamp&".qvw"                 'Here you can specify the backup path
  	ActiveDocument.SaveAs "C:\Users\root\Desktop\Main.qvw"						'paste here the path to the original .qvw file to guarantee not being in the wrong document after macroexecution
End Sub  

 

 

hope this helps

 

abhijith28
Creator II
Creator II
Author

with Qlikview desktop, not with the server

agigliotti
Partner - Champion
Partner - Champion

you can find it under User Preferences->Save.
You could enable "Save Before Reload" and also "Use Backup" with Keep Last 3(for example) Instances.
I hope it helps.
abhijith28
Creator II
Creator II
Author

Yeah, Thank you..

But where could i find these back up files? where it will be saved?