VSView Reporting Edition Reference > VSReport Control > VSReport Methods > Copy Method |
Copies all the information from an existing report object.
[form!]VSReport.Copy SourceReport As IVSReport
This method copies a report definition from one control to another. It is useful mainly in applications that provide report design capabilities, when implementing Undo/Redo or Copy/Paste functionality. For example:
Private Sub SaveUndoState()
m_vsrUndo.Copy vsr ' copy report to undo buffer
m_bCanUndo = True ' we can Undo now
End Sub
Private Sub Undo_Click()
If m_bCanUndo Then ' make sure we can undo
vsr.Copy m_vsrUndo ' copy buffer into main report
m_bCanUndo = False ' we can't undo now
End If
End Sub