Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I'm making one application with the data from other applications. I need to show the last reload date of each application.
Where can I find such information? Log files aren't good for me. They show the last reload date, but do not take into account if the reload was successful or not. I need to display the last date of successful reload. If the reload wasn't successful, than I need to show previous successful reload...
I have one solution, but it doesn't work as good as I want:
There is an action "OnPostReload" in document settings. Using that I wrote a macro:
sub msgboxas
Dim cnn
set cnn = createobject("ADODB.Connection")
"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=staging;Data Source=."
"insert into Table1 values (getdate())"
End Sub
The idea is that, when reload of an application is finished (successfully), the Action inserts today's date into SQL table "Table1".
So I can see not only the last reload date, but also all history.
This works perfect if I reload an application by hand. But if I use the "Comand line" to reload the application, the Action doesn't work (it doesn't insert today's date into SQL table "Table1".) So if the application is loaded automatically (I am using QlikView Server), the action doesn't work.
Any solution or new ideas?
King regards,
Milda
Hi
Try this in the script.
Anders
ReloadTable:
LOAD
'Application2.qvw' as Application,
reloadtime() as ReloadTime
autogenerate(1)
;join(ReloadTable)
LOAD
[Application],ReloadTime
FROM C:\QlikView\ReloadTable.qvd (qvd);
store ReloadTable into C:\QlikView\ReloadTable.qvd (qvd);
Hi
I use this in a textbox to show last reload time.
='Last update' &chr(13)&ReloadTime( )
Maybe you can do something with this.
Anders
Thank you, Anders,
but this is not good for me, because this function shows the reload time of itself. And I need to show the reload time of other applications
Lets say i have 3 applications:
Application1.qvw
Application2.qvw
Application3.qvw
and one general application General.qvw.
In General.qvw i need to show the reload time of other applications:
Application Reload Time
Application1.qvw 2010.07.05
Application2.qvw 2010.07.10
Application3.qvw 2010.07.12
Hi
Maybe you can store the information i a QVD-table.
You can use ReloadTime( ) in the script.
If you then store applicationname and reloadtime i a QVD-table
you will have a logfile.
I have not test it yet, but I think it will work.
Anders
Hi
Try this in the script.
Anders
ReloadTable:
LOAD
'Application2.qvw' as Application,
reloadtime() as ReloadTime
autogenerate(1)
;join(ReloadTable)
LOAD
[Application],ReloadTime
FROM C:\QlikView\ReloadTable.qvd (qvd);
store ReloadTable into C:\QlikView\ReloadTable.qvd (qvd);
You should try something like
for each File in filelist (C:\Qlikview\*.qvw)
QvwDates:
Load '$(File)' as Name, FileSize( '$(File)' ) as
Size, FileTime( '$(File)' ) as FileTime
autogenerate 1;
next File
Thank you! Nice and simple.
HEy,
I didn't ghet this.
Can you pls explain what is going on in first and second load statement ??
Thanks
where should i place these codes to?