Mengatur
tinggi-lebar object report tidak seperti dan semudah mengatur
tinggi-lebar object pada umumnya (form) yang hanya tinggal bikin
object lalu atur tinggi-lebarnya. Untuk atur tinggi-lebar
(ReportLabel/ReportTextLabel) harus memastikan object tersebut berada
pada sebuah object parent (objek induk) yang merupakan sebuah object
Container yakni ReportHBox, yaitu sebuah container/wadah yang
menampung object secara berurutan kesamping. Jika hanya menggunakan
container ReportVBox sepengelaman penulis tidak bisa karena otomatis
ke Expand, kecuali dibantu dengan ReportHBox didalamnya.
Contoh:
Private Report1 As
New Report
Private ReportHBox1
As ReportHBox
Private ReportLabel1
As ReportLabel
Private
ReportTextLabel1 As ReportTextLabel
Public Sub
Form_Open()
ReportHBox1 = New
ReportHBox(Report1)
ReportLabel1 = New
ReportLabel(ReportHBox1)
ReportTextLabel1 =
New ReportTextLabel(ReportHBox1)
ReportLabel1.Text
= "ReportLabel1"
ReportLabel1.Width
= 200
ReportLabel1.Height = 20
ReportLabel1.BackGround = ReportBrush.Color(&H00FFFF)
ReportTextLabel1.Text = "ReportTextLabel1"
ReportTextLabel1.Width = 150
ReportTextLabel1.Height = 20
ReportTextLabel1.BackGround = ReportBrush.Color(&H9EC5EC)
‘Jika menggunakan
ReportView untuk melihat hasilnya
ReportView1.Report
= Report1
End
Selamat belajar
Tidak ada komentar:
Posting Komentar