Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm using Macros to generate 3 files after reload. So I have 3 Macro Triggers On Post Reload. Problem I have is that .jpg files are not exported, but .html is. My Macro is as follows:
function saveHTML()
set cs = ActiveDocument.GetSheetObject("CH14")
cs.ExportHtml "E:\ssh\data\AppStoreSales.html"
set cs = nothing
end function
sub Export1
set obj = ActiveDocument.GetSheetObject("CH09")
obj.ExportBitmapToFile "E:\ssh\data\CH09.jpg
end sub
sub Export2
set obj = ActiveDocument.GetSheetObject("CH10")
obj.ExportBitmapToFile "E:\ssh\data\CH10.jpg"
end sub
As reload is scheduled with .bat file from Windows tasks, then it should work, am I right?
When I reload template manually then all three files are generated.
I am not familiar with Macros and appreciate any help. What should I change?
Thanks in advance,
Mariliis
Hi Mariliis,
I had similar problem with .JPG format in the past. Have you tried to export image as BMP instead of JPG? Here is the post on how to export the images.
http://community.qlik.com/message/153735#153735
I hope this helps!
Cheers - DV
Hi,
Thank you for your answer. I did try .BMP format and unfortunately the situation is same. When I open document and choose reload then new files are created, but not when reload is triggered by .bat file.
Any ideas?
Mariliis
Mariliis - Which version of QlikView Server are you using?
Hi,
Server build number is 10.0.8715.5 and client where reload works is version 10.00.8935.7 SR2.
Mariliis
Hi,
It's strange that you can export one format but not the others.
Are you using the /nosecurity tag on the .bat file?
qv.exe File.qvw /NoSecurity
Regards,
Erich
Hi,
We changed the scipt now and it's in linux server, but it should still work and it has NoSecurity specified
This is the script:
scp ${importFile} ${biServer}:${biLocation}
ssh ${biServer} 'cmd /c e:\\QlikView\\qv.exe c:\\Documents\ and\ Settings\\All\ Users\\Application\ Data\\QlikTech\\Documents\\HW_MacAppStoreSales.qvw /r /NoSecurity'
First part of it is just to send one file needed for reload to the biServer where templates are held.
Mariliis
Make sure you activate the sheet for each chart object before exporting. And use WaitForIdle between all calls.
This had to be done in version 9. Maybe there is a similar problem in version 10.
QvDoc.Sheets("Sheet1").Activate
Qv.ActiveDocument.GetApplication.WaitForIdle
Set QvExp = QvDoc.GetSheetObject("CH01")
Qv.ActiveDocument.GetApplication.WaitForIdle
QvDoc.Sheets("Sheet2").Activate
Qv.ActiveDocument.GetApplication.WaitForIdle
Set QvExp = QvDoc.GetSheetObject("CH02")
Qv.ActiveDocument.GetApplication.WaitForIdle