Today , we will see the Display Crystal Report title -- Programmatically in VB.net
Here is a Code:
Create a Text Object in the Design View.
Call this code in the Crystal report viewer Load event.
Here is a Code:
Create a Text Object in the Design View.
Call this code in the Crystal report viewer Load event.
Dim cry As CrystalReport1 = New CrystalReport1()
Dim txtHeader As CrystalDecisions.CrystalReports.Engine.TextObject = cry.Section1.ReportObjects("txtHeader")
Dim txtAddress1 As CrystalDecisions.CrystalReports.Engine.TextObject = cry.Section1.ReportObjects("txtAddress1")
Dim txtAddress2 As CrystalDecisions.CrystalReports.Engine.TextObject = cry.Section1.ReportObjects("txtAddress2")
Dim txtAddress3 As CrystalDecisions.CrystalReports.Engine.TextObject = cry.Section1.ReportObjects("txtAddress3")
txtHeader.Text = "IBM"
txtAddress1.Text = "OMR Road"
txtAddress2.Text = "Chennai"
Me.CrystalReportViewer1.ReportSource = cry