gambas-source-code/app/examples/Printing/ReportExample/.src/Report1.class
Benoît Minisini c6a9cd69c2 [EXAMPLES]
* NEW: Add examples again. I hope correctly this time.


git-svn-id: svn://localhost/gambas/trunk@6726 867c0c6c-44f3-4631-809d-bfa615b0a4ec
2014-12-12 19:58:52 +00:00

32 lines
700 B
Text

' Gambas class file
'Static Public Type As String
Public Sub _new(sType As String)
Dim hResult As Result
Dim Rlbl As ReportLabel
Dim hConn As Connection
hConn = Connections["Connection1"]
hConn.Type = sType
If hConn.Type = "sqlite" Then hConn.Host = User.Home
Try hConn.Open
If Not hConn.Opened Then
Message.Error(" You have to create the test database with the <b>Database</b> example.")
Return
Endif
hResult = db.Limit(300).Find("test")
If Not hResult.Available Then Return
For Each hResult
Rlbl = New ReportLabel(RVBCont)
Rlbl.Autoresize = True
Rlbl.Text = hResult!name & " " & hResult!firstname
Rlbl.Border.bottom.Width = "1px"
Next
End