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
Printable View
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
VB Code:
Private Sub CREPORT_Click() On Error GoTo ErrorTrap TSQL = "" TSQL = "SELECT * FROM TABLE " Set RTMP = Get_Special_Record_Set(TSQL) 'Function Giving record set use your connection here If RTMP.RecordCount = 0 Then MsgBox "Record Not Found", vbInformation Exit Sub End If With FIRM_STATUS 'Report Name Set .DataSource = Nothing Set .DataSource = RTMP.DataSource End With 'firm status is datareport name 'don't forget to write all control in section 1 of your report 'coding by banna With FIRM_STATUS.Sections("Section1").Controls .Item("LD1").Caption = DTP1.Value 'label first name ld1 .Item("LD2").Caption = DTP2.Value 'label second name ld2 .Item("TXTFIRM").DataMember = "" .Item("TXTFIRM").DataField = RTMP.Fields("FIRM").Name 'textbox first name txtfirm 'firm is field firm in the table .Item("TXTLOCATION").DataMember = "" .Item("TXTLOCATION").DataField = RTMP.Fields("LOCATION").Name 'txtbox second name txtlocation 'location is field location in the table .Item("LABNOEMP").Caption = EMP 'label third name labnoemp .Item("LSALARY").Caption = Val(SALARY) 'label lsalary name lsalary End With FIRM_STATUS.Refresh 'firm_status is datareport name FIRM_STATUS.Show ErrorTrap: If Err.Number <> 0 Then MsgBox "Error (" & Err.Number & "): " & Err.Description, vbCritical, "Error" End If End Sub