Binding a string to a textfield on a report at runtime

This sample demonstrates how to display a string in an unbound field on a crystal report. This can be used to display messages which are diffrent depending on runtime parameters during report generation.

Private Sub DisplayReport()
  Dim myreport As ReportDocument
  Dim freestring As CrystalDecisions.CrystalReports.Engine.TextObject
  myreport = New ReportDocument
  freestring = myreport.ReportDefinition.ReportObjects("Text1")
  freestring.Text = "Your message here"
  CrystalReportViewer1.ReportSource = myreport
End Sub