accessray
Sep 8th, 2008, 05:22 AM
Dear Experts,
When i try to send the values from my database to the controls in the datareport ReportHeader Section, it doesnot show anything though the data has been passed.
My code is:
Dim RPay As New ADODb.Recordset
If DataEnvi.Connection1.State = 1 Then
DataEnvi.Connection1.Close
End If
DataEnvi.Connection1.Open
DataEnvi.rpt
rpt.Refresh
Set RPay = Con.Execute("select * from company")
rpt.Sections("ReportHeader").Controls("label1").Caption = RPay("companyname")
Debug.Print rpt.Sections("ReportHeader").Controls("label1").Caption
rpt.Sections("ReportHeader").Controls("Label2").Caption = RPay("addressline1") + "," + RPay("addressline2")
rpt.Show
Please Help with this....
When i try to send the values from my database to the controls in the datareport ReportHeader Section, it doesnot show anything though the data has been passed.
My code is:
Dim RPay As New ADODb.Recordset
If DataEnvi.Connection1.State = 1 Then
DataEnvi.Connection1.Close
End If
DataEnvi.Connection1.Open
DataEnvi.rpt
rpt.Refresh
Set RPay = Con.Execute("select * from company")
rpt.Sections("ReportHeader").Controls("label1").Caption = RPay("companyname")
Debug.Print rpt.Sections("ReportHeader").Controls("label1").Caption
rpt.Sections("ReportHeader").Controls("Label2").Caption = RPay("addressline1") + "," + RPay("addressline2")
rpt.Show
Please Help with this....