[Gambas-user] Questions about gb.report2
bagonergi at gmail.com
Tue Aug 20 17:28:11 CEST 2019
Sorry, this answer was directed only to Hans, it didn't have to appear
Fortunately I did not criticize Fabien ;-D
I'm a lucky dog!
Il giorno mar 20 ago 2019 alle ore 17:12 Gianluigi <bagonergi at gmail.com> ha
> Hi Hans,
> You have the answer to the first two questions in the IDE by navigating in
> the Gambas project (in my case, gambasdevel) until you open in the
> Components gb.report2 > ReportControl > ReportFrame > ReportLabel.
> In ReportLabel.class you can see this code in the _Paint routine:
> If sTempText Begins "=" Then
> sTempText = $hEval.Value
> If $sFormat Then
> Try sTempText = Format(sTempText, $sFormat)
> If $bUseField Then
> sTempText = DecodeText(sTempText, Page)
> and the Function:
> Private Function DecodeText(sText As String, Optional Page As Integer,
> Optional ForSize As Boolean = False) As String
> If ForSize Then
> If InStr(sText, "$PAGE") Then sText = Replace(sText, "$PAGE", "999")
> If InStr(sText, "$NPAGE") Then sText = Replace(sText, "$NPAGE", "999")
> If InStr(sText, "$PAGE") Then sText = Replace(sText, "$PAGE", Str(Page
> + 1))
> If InStr(sText, "$NPAGE") Then sText = Replace(sText, "$NPAGE",
> Return sText
> If I well understood Fabien's intentions, now it only works with page,
> pages, index but I think the intention is to extend it to other regular
> But I'm not sure.
> UserField: Fabien in tmpJournal write this:
> Restore the UseField property in ReportLabel so for now the component is
> backward compatible.
> Range: I don't think it's activated in either gb.report2, see:
> Il giorno mar 20 ago 2019 alle ore 11:08 Hans Lehmann <hans at gambas-buch.de>
> ha scritto:
>> I currently have several questions about the component gb.report2:
>> - Where can I find information about the variables(?) `page` and
>> `pages? So far I couldn't find anything on the internet.
>> - Why do I have to write ReportLabel in the properties (in the IDE in
>> the object inspector) to a report control ReportLabel as footer in the
>> properties for example `="Page " & page & " of " & pages`? Why the equal
>> sign at the beginning?
>> - What is the meaning of the `UseField` property? Which field is
>> meant by this?
>> - We are looking for documentation for the property `Range`. What do
>> I have to add to the `Range` property? Which data type? Which value range
>> is to be considered?
>> With kind regards
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the User