I have a particularly nasty problem that involves the following sequence to achieve its final outcome:
Report1 -> Hotfile1
Hotfile1 -> Report2 -> Hotfile2
Hotfile1 -> Report3-> Hotfile3
Hotfile2 -> Report4 -> Hotfile4
Hotfile3 -> Report5-> Hotfile5
Hotfile1 -> Report6 -> Hotfile6
Hotfile6 -> Report7 -> Hotfile7
HotFile4, HotFile5 & Hotfile7 ->Report8
This all works until I use a macro to do the job. It works fine the first time. If I then leave the reports open & rerun the macro with different prompt criteria, Report8 will not update unless I do Report/Retrieve from the Menu. Incidentally if I run the report for the 3rd time it displays results for the 2nd run and so on. I can just about get round it using 'Sendkeys' which I don't like because a user (or an email) could change the focus at the wrong time.
I use Application.OpenReport to open the reports and have tried ReportDocument.RetrieveAll to try to force the issue.
Sorry for such a long question, but if anyone has any ideas of how to get round this I'd be extremely grateful
Simon Rouse
Report1 -> Hotfile1
Hotfile1 -> Report2 -> Hotfile2
Hotfile1 -> Report3-> Hotfile3
Hotfile2 -> Report4 -> Hotfile4
Hotfile3 -> Report5-> Hotfile5
Hotfile1 -> Report6 -> Hotfile6
Hotfile6 -> Report7 -> Hotfile7
HotFile4, HotFile5 & Hotfile7 ->Report8
This all works until I use a macro to do the job. It works fine the first time. If I then leave the reports open & rerun the macro with different prompt criteria, Report8 will not update unless I do Report/Retrieve from the Menu. Incidentally if I run the report for the 3rd time it displays results for the 2nd run and so on. I can just about get round it using 'Sendkeys' which I don't like because a user (or an email) could change the focus at the wrong time.
I use Application.OpenReport to open the reports and have tried ReportDocument.RetrieveAll to try to force the issue.
Sorry for such a long question, but if anyone has any ideas of how to get round this I'd be extremely grateful
Simon Rouse