942,520 Members | Top Members by Rank

Ad:
Jan 5th, 2009
0

showing record on the report

Expand Post »
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.
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Private Sub Command4_Click()
  2. Dim mr As Integer
  3. mr = InputBox("enter a mr no")
  4. Set rs = New adodb.Recordset
  5. rs.Open "select * from MR where req_no = " & CStr(mr), con, adOpenDynamic, adLockOptimistic
  6. If Not rs.EOF Then
  7. With DataReport2.Sections("section1").Controls
  8. .Item("text1").DataField = rs.Fields("productname").Name
  9. .Item("text2").DataField = rs.Fields("qty").Name
  10. .Item("text3").DataField = rs.Fields("unit").Name
  11. End With
  12. Set DataReport2.DataSource = rs
  13. DataReport2.Orientation = rptOrientLandscape
  14. DataReport2.Show
  15. End If
  16. End Sub
Last edited by Ancient Dragon; Jan 5th, 2009 at 3:22 pm. Reason: add code tags
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
firoz ahmed is offline Offline
5 posts
since Dec 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Printing through Print Server
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC