Results 1 to 2 of 2

Thread: Visual Basic 6.0 DataReport,

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2007
    Posts
    2

    Visual Basic 6.0 DataReport,

    hi,
    i am useing Visual Basic 6.0 Datareport ,

    RptLabel.caption = RptFunction1 + RptFunction2 ????

    i want two function add value in Rptlabel
    how can i do this??? any Buddy know please help me

    thank u

  2. #2
    Just Married shakti5385's Avatar
    Join Date
    Mar 2006
    Location
    Udaipur,Rajasthan(INDIA)
    Posts
    3,747

    Arrow Re: Visual Basic 6.0 DataReport,

    VB Code:
    1. Private Sub CREPORT_Click()
    2. On Error GoTo ErrorTrap
    3.  
    4. TSQL = ""
    5. TSQL = "SELECT * FROM TABLE "
    6. Set RTMP = Get_Special_Record_Set(TSQL)
    7. 'Function Giving record set use your connection here
    8.  
    9. If RTMP.RecordCount = 0 Then
    10. MsgBox "Record Not Found", vbInformation
    11. Exit Sub
    12. End If
    13.  
    14.  
    15. With FIRM_STATUS 'Report Name
    16.     Set .DataSource = Nothing
    17.     Set .DataSource = RTMP.DataSource
    18. End With
    19. 'firm status is datareport name
    20. 'don't forget to write all control in section 1 of your report
    21. 'coding by banna
    22. With FIRM_STATUS.Sections("Section1").Controls
    23.    
    24.     .Item("LD1").Caption = DTP1.Value
    25.     'label first name ld1
    26.     .Item("LD2").Caption = DTP2.Value
    27.     'label second name ld2
    28.     .Item("TXTFIRM").DataMember = ""
    29.     .Item("TXTFIRM").DataField = RTMP.Fields("FIRM").Name
    30.     'textbox first name txtfirm
    31.     'firm is field firm in the table
    32.     .Item("TXTLOCATION").DataMember = ""
    33.     .Item("TXTLOCATION").DataField = RTMP.Fields("LOCATION").Name
    34.     'txtbox second name txtlocation
    35.     'location is field location in the table
    36.     .Item("LABNOEMP").Caption = EMP
    37.     'label third name labnoemp
    38.     .Item("LSALARY").Caption = Val(SALARY)
    39.     'label lsalary name lsalary
    40. End With
    41. FIRM_STATUS.Refresh
    42. 'firm_status is datareport name
    43.  
    44. FIRM_STATUS.Show
    45. ErrorTrap:
    46. If Err.Number <> 0 Then
    47.    MsgBox "Error (" & Err.Number & "): " & Err.Description, vbCritical, "Error"
    48. End If
    49. End Sub

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