RB renames automaticly ppLabel Controls
I have a report with several ppLabel Controls. When RB opens the
template file, it renames some of the ppLabel Controls. For example the
declaration of a ppLabel in the template file looks like
object ppLabel53: TppLabel
UserName = 'Label22'
Anchors = [atLeft, atBottom]
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1.000000000000000000
Caption = 'Seite'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 10
Font.Style = []
TextAlignment = taRightJustified
Transparent = True
mmHeight = 4022
mmLeft = 99484
mmTop = 71702
mmWidth = 7959
BandType = 0
end
When I open the report, the name of the field in the object inspector is
now ppLabel4 and when I save the report, the name in the template file
will also be changed.
This is a serious problem for me, because I reference in my sourcecode
the label with the name ppLabel53.
I use RB 10.03
Regards
Guido
template file, it renames some of the ppLabel Controls. For example the
declaration of a ppLabel in the template file looks like
object ppLabel53: TppLabel
UserName = 'Label22'
Anchors = [atLeft, atBottom]
Border.BorderPositions = []
Border.Color = clBlack
Border.Style = psSolid
Border.Visible = False
Border.Weight = 1.000000000000000000
Caption = 'Seite'
Font.Charset = DEFAULT_CHARSET
Font.Color = clBlack
Font.Name = 'Arial'
Font.Size = 10
Font.Style = []
TextAlignment = taRightJustified
Transparent = True
mmHeight = 4022
mmLeft = 99484
mmTop = 71702
mmWidth = 7959
BandType = 0
end
When I open the report, the name of the field in the object inspector is
now ppLabel4 and when I save the report, the name in the template file
will also be changed.
This is a serious problem for me, because I reference in my sourcecode
the label with the name ppLabel53.
I use RB 10.03
Regards
Guido
This discussion has been closed.
Comments
- If you have multiple reports that reside on the same form/datamodule then
that can cause the issue. When a report template loads, the Delphi VCL will
rename any components that are not unique. In Delphi, the Form/DataModule is
the Owner the components that it contains and each component must have
unique Name. Each of the elemenents in the Report - Label, DBText, etc. -
are components Owned by the form/datamodule.
- RB Enterprise includes a run-time Pascal environment, RAP, that can be
used to code event-handlers that are stored as part of the report definition
(inside the template). RAP code references report elements by the UserName
property rather than the name. The UserName has to be unique only within the
report.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
There are no other reports on the form. Even when I start a new VCL
project with an empty Mainform, put a ppReport Component on it, load the
template, some of the ppLabel controls are renamed.
I use only RB Professional.
Regards
Guido
When I tried a simple test here I could not recreate the issue.
Please specify exact steps to recreate - perhaps using the RB examples or
create a simple example project that we can run here and email to
support@digital-metaphors.com in zip format.
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Regards
Guido