Replaceable forms etc
Nico Cizik replied to Luciana Lano Pinto on 27 May that "All forms in
ReportBuilder are replaceable", with regard to a formcreate/language
translation issue. Yet in response to a similar post from me on 29 May he
says "Unfortunately, the Designer form is the one form in ReportBuilder that
is
not replaceable".
1. Can we be absolutely certain here: is the Designer form replaceable or
not?
2. Can someone please tell me an event to use in which I can access the
properties of all the components in this form - I too wish to translate
them, but not using the resource manager.
3. Finally, related but different, when a report is loaded from a template
into the Designer, are the components of the template (eg ppLabel1, etc)
available as components at runtime, with properties that can be accessed in
code? If so, on which event can one access these?
Many thanks.
Jonathan Hyams
NB I use RB 6
ReportBuilder are replaceable", with regard to a formcreate/language
translation issue. Yet in response to a similar post from me on 29 May he
says "Unfortunately, the Designer form is the one form in ReportBuilder that
is
not replaceable".
1. Can we be absolutely certain here: is the Designer form replaceable or
not?
2. Can someone please tell me an event to use in which I can access the
properties of all the components in this form - I too wish to translate
them, but not using the resource manager.
3. Finally, related but different, when a report is loaded from a template
into the Designer, are the components of the template (eg ppLabel1, etc)
available as components at runtime, with properties that can be accessed in
code? If so, on which event can one access these?
Many thanks.
Jonathan Hyams
NB I use RB 6
This discussion has been closed.
Comments
1. The Designer form is the only form in ReportBuilder that is not
replaceable through the form regristration archetecture.
2. If you need to make a translation for ReportBuilder, you need to check
out the ReportBuilder String Translation Tool. You can download this tool
by following the link below.
3. If you wish to use the report components at runtime from a loaded Report
Template, you will have to use a report object loop to access them. You
will not however, be able to reference the components by name as they are
given default names only when loading and a naming conflict occurs. If you
need to reference report template components by name at runtime, you will
need to use RAP (Report Application Pascal). This allows you to keep the
entire report template separate from your delphi application by keeping all
event handler code and other functions inside the template.
http://digital-metaphors.com/lang/rbLang.exe
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
users are able to change their translations at runtime, ie they might
change the word "File" to "Archive" or correct a spelling error in a
translation. I do not want to have to build/compile versions for each end
user translation!
So I have my own translation methodology which can translate any form, any
component at runtime. Provided I can get at them. I don't need to know the
names of the components, just get the caption/text/strings type properties
and then I can translate them.
So which event:
1) gives me access to all the components (menuitems, button.hints, etc)
on the Designer?
2) gives me access to all the components(rbText.caption etc) when the
template has been loaded?
Please!!! It can't be that difficult surely?????
Jonathan Hyams
You will want to use the OnShow event in the designer to access the
Designer.Form property typecasted as TppDesignerWindow. Use the
ToolbarManager property to access the different toolbars and their buttons.
The Designer's menu is accessed by the TppDesigner.Menu property. These are
the items you are able to easily change. Other than this, it's going to be
very difficult to translate the other visual strings in the designer.
The forms in RB are softcoded to be created from a class registry so you
will not be able to change them on the fly very easily. You are of course
welcome to try as the source is shipped with ReportBuilder. Two
alternatives are to use Delphi Resource DLL Wizard and include all the RB
.dfm files or to use our ReportBuilder String Translation application.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com