[Gambas-user] One report for each query?

Gianluigi bagonergi at gmail.com
Sat Nov 2 14:34:17 CET 2019


Hi Fabien,

thank you very much for the answers, you are great 👍
Regarding "hReport = New Report1", I would have had to figure it out on my
own, the senile stupidity is a bad thing :-(

Unfortunately I still don't understand how to color the strings :-((

See attachment with suggested changes

Regards
Gianluigi

Il giorno sab 2 nov 2019 alle ore 12:54 Fabien Bodard <gambas.fr at gmail.com>
ha scritto:

> 'hRel.Brush.Color = ReportBrush.Color(Color.DarkBlue) I don't understand
> how do this sigh!
>
> no ! :
> hRel.Brush = ReportBrush.Color(Color.DarkBlue) I don't understand how do
> this sigh!
>
> hRel.Brush receive a brush generated by ReportBrush... it work like
> Paint.Brush with (paint.Color/Paint.gradient/...)
>
> Le sam. 2 nov. 2019 à 12:50, Fabien Bodard <gambas.fr at gmail.com> a écrit :
>
>> well because you use only the auto generated instance .
>>
>> When you call Report1.Preview
>>
>> in background it do a thing like
>>
>> Report1 = New Report1
>>
>> 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
>>
>> You'll have to do a :
>> Dim hForm as new Form1 as "Form"
>> hForm.Show
>>
>> All of that to say .... in your case do :
>>
>> Public Sub Button1_Click()
>>   hreport = new Report1
>>   $hResult = MBase.ReturnDataNumber()
>>   If Not $hResult Then
>>     Message.Error(("Query result not available\n\nSorry but it is
>> impossible to continue."))
>>     Me.Close
>>     Return
>>   Endif
>> hReport.Preview
>>
>> End
>>
>> Public Sub Button2_Click()
>>   hReport = new Report1
>>   $hResult = MBase.ReturnDataDate()
>>   If Not $hResult Then
>>     Message.Error(("Query result not available\n\nSorry but it is
>> impossible to continue."))
>>     Me.Close
>>     Return
>>   Endif
>>   hReport.Preview
>>
>> End
>>
>>
>>
>> Le ven. 1 nov. 2019 à 18:24, Gianluigi <bagonergi at gmail.com> a écrit :
>>
>>> Hi Fabien,
>>>
>>> inspired by a discussion on the German forum I wanted to see if I could
>>> make a report in that way.
>>> I was unable to use the same report for two slightly different queries.
>>> Should I use a different report for each query?
>>> I can't change the color of the writing with the code.
>>>
>>> Any suggestions?
>>>
>>> Regards
>>> Gianluigi
>>>
>>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>>
>>
>>
>> --
>> Fabien Bodard
>>
>
>
> --
> Fabien Bodard
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191102/b05cec1d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GermanTest-0.0.2.tar.gz
Type: application/gzip
Size: 15260 bytes
Desc: not available
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20191102/b05cec1d/attachment-0001.gz>


More information about the User mailing list