<div dir="ltr">  Dim s, sHistory As String<br>  Dim ss As String[]<br>  Dim hRel As ReportTextLabel<br>  Dim hTitle As ReportLabel<br>  Dim iWidth, H, i As Integer<br>  Dim hResult As Result<br><br>  'Report.Debug = True<br>  hResult = FMain.hResult<br>  hResult.MoveFirst<br>  For i = 0 To hResult.Count - 1<br>    sHistory &= hResult!hinum & " " & Format(hResult!hidat, gb.ShortDate) & "\n"<br>    sHistory &= hResult!hilon & "\n\n"<br>    hResult.MoveNext<br>  Next<br>  Report1.Font = Font["Serif,12"]<br>  iWidth = ReturnWidth()<br>  H = Report1.Font.H<br>  '--- Title<br>  hTitle = New ReportLabel(ReportVBox1)<br>  hTitle.Font = Font["Serif, bold, 16"]<br>  hTitle.Brush = ReportBrush.Color(Color.Red) '' I don't understand how do this sigh!<br>  hTitle.Alignment = Align.Center<br>  hTitle.Text = "History of Meismann test on " & Format(Now, gb.ShortDate)<br>  '---space<br>  hRel = New ReportTextLabel(ReportVBox1)<br>  hRel.Height = "10mm"<br>  ss = Split(sHistory, "\n", Null, False, True)<br>  For Each s In ss<br>    hRel = New ReportTextLabel(ReportVBox1)<br>    hRel.Font = Font["Serif,12"]<br>    hRel.Alignment = Align.Justify<br>    hRel.Text = s<br>    hRel.Height = CStr(Rows(s, iWidth) * H) & "px"<br>  Next<br><div><br></div><div><br></div><div>The problem come fro the fact that you use a reportTextLabel... the color for this kind of object must be set by the richtext elements. <br></div><div>In your case it is better to use a textLabel for the title that use the brush property :-).</div><div><br></div><div>The other way for richtextLabel is :</div><div><br></div><div>"<font color=#00FF00>" & MyText & "</font>"</div><div><br></div><div>ex :</div><div>  hRel = New ReportTextLabel(ReportVBox1)<br>  hRel.Font = Font["Serif, bold, 16"]<br>  hRel.Brush = ReportBrush.Color(Color.DarkBlue) '' I don't understand how do this sigh!<br>  hRel.Alignment = Align.Center<br>  hRel.Text = "<font color=#0000FF>History of Meismann test on " & Format(Now, gb.ShortDate) & "</font>"</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 2 nov. 2019 à 14:35, Gianluigi <<a href="mailto:bagonergi@gmail.com">bagonergi@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Fabien,<br><br>thank you very much for the answers, you are great 👍<br>Regarding "hReport = New Report1", I would have had to figure it out on my own, the senile stupidity is a bad thing :-(<br><br>Unfortunately I still don't understand how to color the strings :-((<br><br>See attachment with suggested changes<br><br>Regards<br>Gianluigi</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno sab 2 nov 2019 alle ore 12:54 Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>'hRel.Brush.Color = ReportBrush.Color(Color.DarkBlue) I don't understand how do this sigh!</div><div><br></div><div>no ! :</div><div>hRel.Brush = ReportBrush.Color(Color.DarkBlue) I don't understand how do this sigh!</div><div><br></div><div>hRel.Brush receive a brush generated by ReportBrush... it work like Paint.Brush with (paint.Color/Paint.gradient/...)<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le sam. 2 nov. 2019 à 12:50, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>well because you use only the auto generated instance .</div><div><br></div><div>When you call Report1.Preview</div><div><br></div><div>in background it do a thing like</div><div><br></div><div>Report1 = New Report1<br></div><div><br></div><div>So the object Report1 theoretically is not callable directly. In the past ... in the beginning of gambas ... (well 20 years) You cannot do Form1.Show</div><div><br></div><div>You'll have to do a :</div><div>Dim hForm as new Form1 as "Form"<br></div><div>hForm.Show</div><div><br></div><div>All of that to say .... in your case do :</div><div><br></div>Public Sub Button1_Click()<br></div>  hreport = new Report1<br><div>  $hResult = MBase.ReturnDataNumber()<br>  If Not $hResult Then<br>    Message.Error(("Query result not available\n\nSorry but it is impossible to continue."))<br>    Me.Close<br>    Return<br>  Endif <br>hReport.Preview<br><br>End<br><br>Public Sub Button2_Click()<br></div><div>  hReport = new Report1<br></div><div>  $hResult = MBase.ReturnDataDate()<br>  If Not $hResult Then<br>    Message.Error(("Query result not available\n\nSorry but it is impossible to continue."))<br>    Me.Close<br>    Return<br>  Endif <br>  hReport.Preview<br><br>End</div><br><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le ven. 1 nov. 2019 à 18:24, Gianluigi <<a href="mailto:bagonergi@gmail.com" target="_blank">bagonergi@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Fabien,<br><br>inspired by a discussion on the German forum I wanted to see if I could make a report in that way.<br>I was unable to use the same report for two slightly different queries.<br>Should I use a different report for each query?<br>I can't change the color of the writing with the code.<br><br>Any suggestions?<br><br>Regards<br>Gianluigi</div>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">Fabien Bodard </div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr">Fabien Bodard </div>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Fabien Bodard </div>