I have the following table in my DB:
I want to use this data to create a pdf page. Code as follows:
I am using mylist.txt file in:
But I am getting pdf as follows in one line :
How can I make it appear in 4 rows as in DB? Thanks
B4X:
Red Green Blue
5 6 4
4 3 2
4 3 5
5 3 4
I want to use this data to create a pdf page. Code as follows:
B4X:
Dim redc As List
redc.Initialize
Dim rs As ResultSet=sql.ExecQuery $" Select * from current "$
Dim cre(3) As Object
Do While rs.NextRow
cre(0) =rs.Getstring("red")
cre(1)=rs.Getstring("green")
cre(2)=rs.Getstring("blue")
redc.Addall(Array As String(""&cre(0),""&cre(1),""&cre(2)))
Loop
rs.Close
File.Writelist (File.DirInternal, "mylist.txt", redc)
I am using mylist.txt file in:
B4X:
pdf.Canvas.DrawText(File.ReadString(File.dirinternal,"mylist.txt"), 250, 150, Typeface.DEFAULT_BOLD, 30 / GetDeviceLayoutValues.Scale , Colors.blue, "CENTER")
But I am getting pdf as follows in one line :
B4X:
5 6 4 4 3 2 4 3 5 5 3 4
How can I make it appear in 4 rows as in DB? Thanks