|
-
Jan 6th, 2007, 12:34 PM
#1
Thread Starter
New Member
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
-
Jan 8th, 2007, 01:19 AM
#2
Re: Visual Basic 6.0 DataReport,
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|