在form1中改变datareport中在 session1 的 label.caption
Private Sub Command2_Click()
  DataReport1.Sections.Item("section1").Controls.Item("Label1").Caption = "新的标题"
End Sub
打开预览datareport1时,可以看到label.caption已经改变了也可以在datareport1初始化时改变session1 的 label.caption
Private Sub DataReport_Initialize()
  'Set DataReport1.DataSource = DataEnvironment1
  'DataReport1.DataMember = "Command1"
  DataReport1.Sections.Item("section1").Controls.Item("Label1").Caption = "新的标题" 
End Sub