From dePoPo.net

Binding a string to a textfield on a crystal report at runtime

Posted in: Crystal Reports
By dePoPo
Mar 9, 2009 - 3:27:12 PM

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
  myreport.Load()
 
  freestring = myreport.ReportDefinition.ReportObjects("Text1")
  freestring.Text = "Your message here"

  CrystalReportViewer1.ReportSource = myreport
 
End Sub

© Copyright 2010 by dePoPo.net