by Irene V. Yuzbasheva (2 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 3.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating: (13 Votes)
Code below demonstrates how to work with DataReport. You will need:
1. DataEnvironment
2. DataEnvironment Command that receives
parameters.
3. DataReport with;
a. Detail section named "Section1"; and,
b. rptlabel named "lblCopy"
4. Form with a button. Code below should be put on click event.
With UILetterDataReport 'DataReport Name
.DataMember = "cmdClaimsLetter" 'Name of the Command
Set .DataSource = UIDataEnvironment 'Name of the DataEnvironment
.Caption = "Letter for: SSN= " & strSSN ' Changing caption properties of the report
With .Sections("Section1").Controls 'Name of the detail section of the report.
.Item("lblCopy").Caption = "COPY" 'Set caption of the field
End With
.Refresh 'Refresh Report
End With