06-09-2018 09:15 AM
Hi guys,
I've got a problem with Diadem 2014. I'm running a windows scheduled task which starts Diadem with a given script. That works fine (for years now). But lately I changed the report generation to be more flexible, ie creating/copying sheets from within the script.
The problem now occurs after using
Set shUser = Report.Sheets.Copy("sheet1", "user_sheet", 1)
, the new sheet is created, but it is empty. I've tried some solutions discussed in this topic Report Copy - Objects Missing
but none of them are working when running the script via Microsoft Windows Task Scheduling (Diadem not visible). Running the script myself with visible Diadem window works just fine. Hence, I guess the culprit here is the non-visible Diadem window?
I also tried
GraphSheetCopy "sheet1", "user_sheet", Report.Sheets.Count + 1 Set shUser = Report.Sheets("user_sheet")
And also
Report.Sheets("sheet1").Activate Set shUser = Report.Sheets.Copy("sheet1", "user_sheet", 1)
Does anyone have a solution for that problem? besides upgrading to a newer Diadem Version, as this is not possible due to clients restrictions.
Help is greatly appreciated.
Thanks for the help,
Mateusz
Solved! Go to Solution.
06-12-2018 01:52 AM
Hi Mateusz,
If you run this function without a visible DIAdem you Need at least Version 2017. DIAdem 2014 Supports this only with user Interface.
Greetings
Walter
06-13-2018 03:18 AM
Hi Walter,
thanks for the reply. I was afraid this would be the case. So I have to resort to manual copies of this sheet and delete the ones I don't need when running the script.
Best regards,
Mateusz
06-13-2018 07:49 AM
okay, I have to piggy-back on this thread another question as it came up right now.
After I changed the script and the report as described above, another error occurs. This time, when running
Report.RefreshSilent
the following message is logged:
109 14:36:33 Fehler: Fehler in <class_AuswertungTag.VBS> (Zeile: 630, Spalte: 9): List index out of bounds (-1)
When running the code manually with Diadem visible it works, so I assume the problem stays the same, ie the hidden Diadem? Just want to check.
Workaround 2: Create several copies of the Report with different numbers of pages and load the one with as many sheets as needed.
Mateusz
06-15-2018 06:05 AM
Hi Mateusz,
is it possible to get a small script which reproduces this problem?
Greetings
Walter
08-24-2018 10:14 AM
Hi Walter,
sorry for the delay, I'm a little swamped right now.
It turned out, that RefreshSilent was the culprit and doesn't work without visible GUI either. So thank you for your help, the Script is now up and running. After 6th of September I'll have a litle more time on my hand and could make a minimal script reproducing the problem, if you're still interested in solving the underlying problems.
So long and thanks for alle the help 🙂
Best regards,
Mateusz
08-27-2018 12:20 AM
Hi Mateusz,
Yes, please send me the script. Then I can check it with the latest DIAdem version.
Greetings
Walter