Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Data Report Error

Status
Not open for further replies.

Rasheed Shaik

Programmer
Mar 20, 2011
23
SA
Dim obj, rs As ADODB.recordset, SQL As String


Call db_conn
Set rs = New ADODB.recordset


strString = " SELECT cusname,idnumb,mobi,pron,proc,blkno,lannum,sqland,cost,comiso,addit,deduc,gtot,vali,rename" & _
" From reser" & _
" WHERE reno = '" & Combo1.Text & "' "


rs.Open strString, DB, adOpenStatic
Set rs = DB.Execute(strString)
'With reportPS
If Not rs.EOF Then
Set Reservation.DataSource = rs.DataSource


'-----------------------------------------------------------------------------------------------'
'PageHeader
Reservation.Sections("PageHeader").Controls("lblcusname").Caption = CStr(rs!cusname)
Reservation.Sections("PageHeader").Controls("lblidnumber").Caption = CStr(rs!idnumb)
Reservation.Sections("PageHeader").Controls("lblmobile").Caption = CStr(rs!mobi)
Reservation.Sections("PageHeader").Controls("lblPron").Caption = CStr(rs!pron)
Reservation.Sections("PageHeader").Controls("lblProc").Caption = CStr(rs!proc)
Reservation.Sections("PageHeader").Controls("lblBlkno").Caption = CStr(rs!blkno)
Reservation.Sections("PageHeader").Controls("lblLn").Caption = CStr(rs!lannum)
Reservation.Sections("PageHeader").Controls("lblsql").Caption = CStr(rs!sqland)
Reservation.Sections("PageHeader").Controls("lblcost").Caption = CStr(rs!cost)
Reservation.Sections("PageHeader").Controls("lbCommi").Caption = CStr(rs!comiso)
Reservation.Sections("PageHeader").Controls("lblAdd").Caption = CStr(rs!Addit)
Reservation.Sections("PageHeader").Controls("lblDed").Caption = CStr(rs!deduc)
Reservation.Sections("PageHeader").Controls("lblGt").Caption = CStr(rs!Gtot)
Reservation.Sections("PageHeader").Controls("lblVali").Caption = CStr(rs!vali)
Reservation.Sections("PageHeader").Controls("lblrname").Caption = CStr(rs!rename)
Reservation.Sections("PageHeader").Controls("lblcname").Caption = CStr(rs!cusname)
Reservation.Sections("PageHeader").Controls("lblvali1").Caption = CStr(rs!vali)
'-----------------------------------------------------------------------------------------------'


Reservation.Refresh
Reservation.Show vbModal


End If
'End With


'For Each obj In reportPS.Sections("PageHeaders").Controls
' If TypeOf obj Is RptTextBox Then
' obj.DataMember = rs.DataMember

'End If
'Next


********
Error

Run Time Error:2147467259(80004005)
Method 'Sections' of Object 'Reservation' Failed
 
Is this SQL? If so, there is a forum for that.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Still the wrong place to post.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top