2014-02-09 20:37 GMT+01:00 Marty <mmcg29...@frontier.com>: > Hello, > > I'm blundering through my first report. I've looked at the examples and > tried the same code as in report1. Had to make some modifications to > connect to MySQL Database. The report contains a ReportVBox called > RVBCont and a ReportLabel called ReportLabel1. > > The code is below:
try to put autoresize to true on the ReportVBox (it's defult size is 0) or it's expand property to true This is a thing i want to change on the reportcontrol definition ... they must have at less 1 cm of hight/width... but it's not so simple when many report known the default to be at 0 > Public Sub _new(sType As String) > > Dim $Query As String > Dim Rlbl As ReportLabel > Dim strTest As String > > $Query = "SELECT tblneighborhood.* FROM tblneighborhood ORDER BY > Last_Name, First_Name LIMIT 10;" > hResult1 = modMain.$Con.Exec($Query) > hResult1.MoveFirst > 'Report.Debug = True > 'ReportPanel1.DataCount = hResult1.Count > strTest = CStr(hResult1.Count) > > For Each hResult1 > > Rlbl = New ReportLabel(RVBCont) > Rlbl.Autoresize = True > Rlbl.Text = hResult1!Last_Name & " " & hResult1!First_Name > strTest = Rlbl.Text > Rlbl.Border.bottom.Width = "1px" > > Next > > End Another thing Add a reportHbox in the reportVBox in the report editor. Set its height as 1 cm add in it a reportLabel name it lblField and delete the text property content. then in the code Public Sub _new(sType As String) Dim $Query As String Dim Rlbl As ReportLabel Dim strTest As String $Query = "SELECT tblneighborhood.* FROM tblneighborhood ORDER BY Last_Name, First_Name LIMIT 10;" hResult1 = modMain.$Con.Exec($Query) ReportHBox1.DataCount = hResult1.Count end Public sub lblField_Data(Index as integer) hResult1.MoveTo(Index) Last.Data = hResult1!Last_Name & " " & hResult1!First_Name end > The report appears to run. Looking a strTest shows that the names are in > the Rlbl.Text property. Nothing prints on the report preview. It is > blank. In the debug widow is the message "gnome keyring couldn't connect > to /tmp/key-ring-nWROjb/pkcs11 - No such directory". > > I'm using Gambas 3.5 on Ubutu 12.04 LTS. > > By the way I did look a Fabien's sight but I do not speak French. Maybe > some one could suggest a good reference in English. > > Thanks, > Marty > > ------------------------------------------------------------------------------ > Managing the Performance of Cloud-Based Applications > Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. > Read the Whitepaper. > http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user -- Fabien Bodard ------------------------------------------------------------------------------ Managing the Performance of Cloud-Based Applications Take advantage of what the Cloud has to offer - Avoid Common Pitfalls. Read the Whitepaper. http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user