DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   showing record on the report (http://www.daniweb.com/forums/thread166196.html)

firoz ahmed Jan 5th, 2009 7:15 am
showing record on the report
 
i want fields department,job_centre,cost centre should come
first before detail section can anybody tell me how should
i code for that. i have written a code it is working fine but
i am making iso certified report and req. is to place fields just
above the detail section kindly let me know urgent.
Private Sub Command4_Click()
  Dim mr As Integer
  mr = InputBox("enter a mr no")
  Set rs = New adodb.Recordset
  rs.Open "select * from MR  where req_no = " & CStr(mr), con, adOpenDynamic, adLockOptimistic
If Not rs.EOF Then
With DataReport2.Sections("section1").Controls
  .Item("text1").DataField = rs.Fields("productname").Name
  .Item("text2").DataField = rs.Fields("qty").Name
  .Item("text3").DataField = rs.Fields("unit").Name
  End With
  Set DataReport2.DataSource = rs
  DataReport2.Orientation = rptOrientLandscape
  DataReport2.Show
End If
End Sub


All times are GMT -4. The time now is 7:58 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC