02-20-2014 03:11 PM
I have a simple two page report (Find it attached). The second page contains a static text field.
I have s simple script (Find it attached). The script contains a single line: Call Report.Sheets.Copy("Sheet 2","Sheet 3",1) that should copy the second page of my report.
1) I open Diadem, load the report, load the script, run the script. When I look at the reports new page it does not contain the text field that was on the second page of the report.
2) I open Diadem, load the report, switch the report to the second page, switch the report back to the first page, load the script, run the script. When I look at the reports new page it DOES contain the text field that was on the second page of the report.
Why is this?
If I add the following to the script before the copy command: Report.Sheets.Item("SetupSheetTemplate").Activate, then both my above scenarios work.
If I take the new script and attempt to run diadem via LabVIEW (Open DIAdem reference, open report, open script, launch script) I get the same problem where the text field does not appear on the new report page.
Has anyone else seen this?
Thanks for your help
Denis
02-21-2014 06:12 AM
Hi,
try to use this command:
"call graphsheetcopy(("Sheet 2","Sheet 3",1)".
But your script works correctly on my machine.
Simyfren
02-21-2014 03:01 PM
Hi Denis,
Your script also works correctly on my computer with DIAdem 2012 SP1 and DIAdem 2012 SP2.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
02-24-2014 06:14 AM
Simyfren,
thanks for the suggestion. Using the GraphSheetCopy function solves the problem when working within DIAdem without needing the Report.Sheets.Item("SetupSheetTemplate").Activate
However the problem still exists when running the script.
Thanks
Denis
02-24-2014 06:16 AM
Brad,
thanks for testing this out. However we are using version 2012 and updating is not a possibility. Could you possibly perform the same test with version 2012?
Thank you for the help
Denis