We have a very limited set of cases of 'print report' functionality. They were built with Perspectives functionality and we've been using a third party add-in without issues but we are now reassessing the available options. I've been exploring using the PAfE API and have hit a hurdle. These reports cannot be scheduled so need to be triggered manually by certain users. The way I have designed this is to have a 'Controller' workbook that holds both the VBA code and the reference information stored in TM1 cubes (Retrieved via a Universal report and a bunch of DRBW's and a report template. Users can update parameters in that workbook and then initiate the process with a button. The code:
- cycles through the list retrieved in the universal report (Containing the burst code, email address etc)
- copies the report template to a new file with appropriate naming
- opens that new file
- passes paramaters to that file
- calls an API RefreshBook and Unlink Book
- saves/closes
- optionally emails to a recipient retrieved in the universal report
I have one report (About 3 sheets with multiple dynamic reports) that goes through 41 iterations and that is working without issues. I have 2 other reports that need to through about 290 iterations. I have been testing one (Several worksheets with many dynamic reports) and on average it will only make it through about 130 before it just stops with both the Controller Template open and one of the files in the iterations open. What I have found is that the 'Controller' template has actually re-opened. So it has encountered some sort of crash but there are no messages. I know there is a Tracelog within the API but I suspect that this is just an unhandled issue and hence it won't get to the point of writing to a lof. When I remove just the RefreshBook (I also tried RefreshAllData) it works to conclusion. So it points to something specific with PAfE.
I'm at the point of giving up. Yes I can go to support but the time considerations are an issue and if this is all inherently unstable then it's too risky to pursue.
Any pointers on where to look for in either Excel logs or PAfE logs? Is this something others have experienced/ overcome.
John
------------------------------
John O'Leary
------------------------------