Results 1 to 9 of 9

Thread: showing detail in the data report

Threaded View

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jan 2009
    Location
    Watch Window(Shift+f9)
    Posts
    1,879

    Question showing detail in the data report

    sir i want to display Department, Unit, Material Description ,Requested by ,....
    etc one time But is is comming two times i don't know why it is comming one time if use group by clause using Having then got error can anybody help me
    Code:
    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
      .Item("text4").DataField = rs.Fields("dept_name").Name
      .Item("text5").DataField = rs.Fields("job_no").Name
      .Item("text6").DataField = rs.Fields("cost_centre").Name
      .Item("Text7").DataField = rs.Fields("Emp_name").Name
      .Item("text8").DataField = rs.Fields("mr_date").Name
      .Item("text9").DataField = rs.Fields("del_point").Name
      .Item("TEXT10").DataField = rs.Fields("MANAGER").Name
      .Item("TEXT11").DataField = rs.Fields("REQ_NO").Name
       End With
      Set DataReport2.DataSource = rs
      DataReport2.Orientation = rptOrientLandscape
      DataReport2.Refresh
      DataReport2.Show vbModeless
    End If
    End Sub
    Last edited by firoz.raj; May 30th, 2011 at 02:11 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width