# Copy or Move a Report Page to a Different Report

**URL:** <https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [January 26, 2021, 4:41pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621 "2021-01-26T16:41:57Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![dandersen](https://avatars.discourse-cdn.com/v4/letter/d/ecb155/32.png) [@dandersen](https://forum.inductiveautomation.com/u/dandersen)\
**Post date:** [January 26, 2021, 4:41pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/1 "2021-01-26T16:41:57Z")

</div>

How can I move a page from 1 report to another report? I do not see an easy way to do it.

---

<div class="post-metadata">

**Author:** ![jespinmartin1](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jespinmartin1/32/57175_2.png) [@jespinmartin1](https://forum.inductiveautomation.com/u/jespinmartin1)\
**Post date:** [January 13, 2022, 11:46pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/2 "2022-01-13T23:46:04Z")

</div>

I’m wondering the same, I want to duplicate a page in the same report

---

<div class="post-metadata">

**Author:** ![DNice](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@DNice](https://forum.inductiveautomation.com/u/DNice)\
**Post date:** [June 27, 2022, 5:44pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/3 "2022-06-27T17:44:25Z")

</div>

Any way to do this simply? I am also wondering.

---

<div class="post-metadata">

**Author:** ![DNice](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@DNice](https://forum.inductiveautomation.com/u/DNice)\
**Post date:** [January 11, 2023, 2:24pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/4 "2023-01-11T14:24:31Z")

</div>

Bump, same question. It is painful to duplicate one currently..

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 11, 2023, 6:07pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/5 "2023-01-11T18:07:31Z")

</div>

Well, by some definition of "easy", this works. I put this all in the script console, but you should able to park the script in the project library and just invoke from the script console.

Grumble grumble _don't call into support if this doesn't work._ This snippet is provided with no warranty, no expectations or disclaimers of support, your mileage may vary, etc. If you are encountering an issue with this, please post it here on this thread or make a new **public** forum thread about it, linking to this post.

```python
from time import sleep
from java.awt import EventQueue
from java.lang import Runnable
from com.inductiveautomation.rm.editor import RMEditorClipboard, RMEditorPaneUtils
from com.inductiveautomation.reporting.designer.workspace import ReportingResourceWorkspace
from com.inductiveautomation.ignition.designer import IgnitionDesigner
from com.inductiveautomation.reporting.common.resource import ReportResource
from com.inductiveautomation.ignition.common.project.resource import ResourcePath

def copyPage(sourceReport, sourcePage, targetReport, targetPage = -1):
	designer = IgnitionDesigner.getFrame()
	workspaceManager = designer.workspace
	
	reportWorkspace = None
	for i in range(workspaceManager.workspaceCount):
		workspace = workspaceManager.getWorkspace(i)
		if workspace.key == ReportingResourceWorkspace.WORKSPACE_KEY:
			reportWorkspace = workspace
	
	class OpenReport(Runnable):
		def __init__ (self, path):
			self.path = path
		
		def run(self):
			resourcePath = ResourcePath(ReportResource.RESOURCE_TYPE, self.path)
			reportWorkspace.open(resourcePath)
			sleep(1)
			sourceEditor = reportWorkspace.findEditor(resourcePath).orElseThrow()
		
			sourceEditor.showDesignPanel()
			sleep(1)
	
	EventQueue.invokeAndWait(OpenReport(sourceReport))
	sleep(1)
	
	pageToCopy = RMEditorPaneUtils.getMainEditor().document.getPage(sourcePage)
	
	EventQueue.invokeAndWait(OpenReport(targetReport))
	sleep(1)
	
	if targetPage >= 0:
		RMEditorPaneUtils.getMainEditor().document.addPage(pageToCopy, targetPage)
		print "Copied page", sourcePage, "from report", sourceReport, "to report", targetReport, "at page", targetPage
	else:
		RMEditorPaneUtils.getMainEditor().document.addPage(pageToCopy)
		print "Copied page", sourcePage, "from report", sourceReport, "to the end of report", targetReport

sourceReport = "a"
sourcePage = 0 # 0 index
targetReport = "b"
targetPage = -1 # -1 to append to the end, or a 0-indexed page to insert

copyPage(sourceReport, sourcePage, targetReport, targetPage)

```

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 11, 2023, 6:09pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/6 "2023-01-11T18:09:31Z")

</div>

> [@paul-griffith](#):
>
> some definition of "easy"

Hah!

---

<div class="post-metadata">

**Author:** ![DNice](https://avatars.discourse-cdn.com/v4/letter/d/858c86/32.png) [@DNice](https://forum.inductiveautomation.com/u/DNice)\
**Post date:** [January 12, 2023, 3:50pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/7 "2023-01-12T15:50:12Z")

</div>

Thank you for the "easy" solution, it works like a charm!

---

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [February 23, 2024, 3:55pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/8 "2024-02-23T15:55:12Z")

</div>

Isn't sleep a concern?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [February 23, 2024, 3:59pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/9 "2024-02-23T15:59:49Z")

</div>

Yes, but less so when called from the scripting console.

---

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [February 23, 2024, 4:02pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/10 "2024-02-23T16:02:34Z")

</div>

I saw copy on a page when I right clicked it. When I pasted, which I could only seem to paste to another page, one single element was pasted.

Why is copying pages in the reports not easier?

I am happy I can copy whole reports.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [February 23, 2024, 4:12pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/11 "2024-02-23T16:12:28Z")

</div>

Because it's very rarely useful, I would guess. It's relatively uncommon that you would actually want an exact duplicate of a whole page in another report, and duplicating it exactly would actually work.

If it's some kind of a "styling" thing you're trying to achieve, expect some news on that front in future updates of Ignition.

---

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [February 23, 2024, 5:19pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/12 "2024-02-23T17:19:56Z")

</div>

Copying saves me time.

---

<div class="post-metadata">

**Author:** ![Zach\_Larson](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/zach_larson/32/54388_2.png) [@Zach\_Larson](https://forum.inductiveautomation.com/u/Zach_Larson)\
**Post date:** [March 20, 2024, 6:56pm UTC](https://forum.inductiveautomation.com/t/copy-or-move-a-report-page-to-a-different-report/42621/13 "2024-03-20T18:56:46Z")

</div>

If I want to move my page 14 to the 18th page, do I need the script?
