DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Report Copy - Objects Missing

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

0 Kudos
Message 1 of 5
(5,896 Views)

Hi,

try to use this command:

"call graphsheetcopy(("Sheet 2","Sheet 3",1)".

But your script works correctly on my machine.

 

Simyfren

0 Kudos
Message 2 of 5
(5,874 Views)

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

0 Kudos
Message 3 of 5
(5,862 Views)

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

0 Kudos
Message 4 of 5
(5,843 Views)

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

0 Kudos
Message 5 of 5
(5,840 Views)