Yes it is possible to use a DBTeeChart in the end-user environment. See the article below for information on how to register components for an end-user report.
------------------------------------------------------------ Article: Controlling the End-User Environment ------------------------------------------------------------
If you are having difficulty getting the Data tab, the Calc tab, the crosstab component or the TeeChart component to appear in your end-user application, or you are trying to eliminate one of these capabilities from the app, then this help topic is for you. The following paragraphs explain the unit registration scheme used by ReportBuilder Pro, and how you can use this scheme to get control over the feature set presented to your end-users.
In order to minimize the overhead in end-user reporting applications, ReportBuilder employs a unit level registration scheme (similar to component registration in Delphi.), whereby components and functionality can be added at the discretion of the developer. In other words, you can control whether the 'Data' workspace, the 'Calc' workspace or certain components appear in your end-user reporting application simply by specifying or omitting certain unit names from the uses clause of your main end-user reporting unit. The advantage of this approach is that overhead associated with features such as DADE, RAP or the crosstab component can be eliminated from your application if you do not wish to pass these features along to the end-user. The disadvantage is that you must manually add certain units to the uses clause or these capabilities will not appear in the application.
In the end-user reporting demo project (located in the ...\RBuilder\Demos\1. Report Explorer directory), the main unit is a form entitled myEURpt. At the top of the unit for this form there is a series of conditional compiler directives which, when enabled, cause certain functionality to appear in the application. The conditional compiler directives in this unit are an attempt to simplify the configuration of the demo application. However, these directives do nothing more than add or omit certain unit names from the uses clause of the form. The important thing to know is the unit names and the functionality that including those unit names will provide. The table below provides this information.
Unit Name Feature ---------- ------------------------------------------------------------- -- daIDE DADE user-interface ('Data' tab)
raIDE RAP user-interface ('Calc tab)
ppCTDsgn User-interface for the configuration of the crosstab. Normally the Crosstab Designer is displayed by accessing the 'Configure...' context menu option of a crosstab component. If this unit is not included then this menu option is not displayed.
myChkBox Checkbox components appear on the component palette when this unit is included. If you want to check out the source for these components it is in ...RBuilder Pro 4\Demos\RCL
ppChrtUI User-interface for editing charts. Normally the chart editor is displayed by accessing the 'Edit...' context menu option of a chart component. If this unit is not included then this menu option is not displayed.
ReportBuilder also uses the unit registration scheme to control which database connectivity options are provided by the application. While including the daDatMan unit will cause the 'Data' workspace to appear in the Report Designer, that workspace will not be functional without a supporting implementation. In ReportBuilder we call these implementations DADE plug-ins. A DADE plug-in is nothing more than a Delphi unit which contains the appropriate descendant class implementations needed by DADE to communicate with a given database. Placing the data access implementation in a separate unit gives us at least two benefits. One is that the user int erface is not tied to any specific database connectivity scheme. The other is that the overhead associated with database support is limited to the database connectivity products you are actually using. This means that if you are using ADO to access your data, you need only include the daADO unit in your uses clause and your application will use ADO only. Most developers use DADE plug-ins to gain access to databases not supported by the BDE, or to gain access to databases without the use of the BDE. The following DADE plug-ins are provided with ReportBuilder Pro:
Unit Name Feature ---------- ---------- daDBBDE BDE support for the Query Wizard and Query Designer
daADO ADO support for the Query Wizard and Query Designer
daIBExpress Interbase Express support for the Query Wizard and Query Designer.
daADS Advantage support.
daDOA Oracle support via the Direct Oracle Access components.
daODBC98 ODBC support via the ODBC98 components.
daIBO InterBase support via the InterBase Objects components.
daDBISAM DBISAM support.
You can use DADE plug-ins at Delphi design-time by generating a package which contains one of these units and then installing it into Delphi. This will allow you to use your preferred database product within the 'Data' workspace at Delphi design-time. You can locate the various DADE plug-in units in the ...\RBuilder\ Demos\EndUser Databases directories. A Delphi package project has been provided for each DADE implementation so that you can generate and install the plug-in at Delphi design-time. For more information on how this can be done, see the ReadMe files in the EndUser Databases directories.
Additional DADE Plug-ins are always being developed. Check the Digital Metaphors web-site for the latest information (see the section Friends:Data:DADE Plug-Ins.)
If you are getting an 'IEdiCha' error message when you try to compile a project that contains TeeChart functionality, then TeeChart is probably installed correctly. In order to get around this error message you must either compile your project with packages or purchase the registered version of TeeChart from www.teemach.com.
You are receiving this error because the compiler cannot find an event handler you have assigned. Please see the article below on lost event handlers.
-------------------------------------------- Article: Troubleshooting Lost Event Handlers --------------------------------------------
Let's assume you have created a report in Delphi and assign an event handlers to the OnPreviewFormCreate event of the report. The event is generated by Delphi as:
You then save the report to an RTM file 'Report1.RTM.' The events are stored as references only, and so the RTM contains:
object ppReport1: TppReport . . OnPreviewFormCreate = ppReport1PreviewFormCreate end
You then go on to work on a different report. Saving it with under then name 'Report2.RTM'. Only this time, before you save the report you change the report component name to: rptOrders. Delphi automatically updates the event declaration for OnPreviewFormCreate event to:
You then create two buttons on the form, one to load Report1 and preview, the other to load Report2 and preview. When you run the app and click Report1, you an error. This is because the Report1.RTM file contains a reference to ppReport1PreviewFormCreate, a method which no longer exists (at least with this name) in the form.
One answer is to load all your rtm files into the report component you will be using for loading. Fix any errors, reassign any events that get cleared. This will update your rtms to contain the proper event handler names.
Comments
Yes it is possible to use a DBTeeChart in the end-user environment. See the
article below for information on how to register components for an end-user
report.
------------------------------------------------------------
Article: Controlling the End-User Environment
------------------------------------------------------------
If you are having difficulty getting the Data tab, the Calc tab, the
crosstab component or the TeeChart component to appear in your end-user
application, or you are trying to eliminate one of these capabilities from
the app, then this help topic is for you. The following paragraphs explain
the unit registration scheme used by ReportBuilder Pro, and how you can use
this scheme to get control over the feature set presented to your end-users.
In order to minimize the overhead in end-user reporting applications,
ReportBuilder employs a unit level registration scheme (similar to component
registration in Delphi.), whereby components and functionality can be added
at the discretion of the developer. In other words, you can control whether
the 'Data' workspace, the 'Calc' workspace or certain components appear in
your end-user reporting application simply by specifying or omitting certain
unit names from the uses clause of your main end-user reporting unit. The
advantage of this approach is that overhead associated with features such as
DADE, RAP or the crosstab component can be eliminated from your application
if you do not wish to pass these features along to the end-user. The
disadvantage is that you must manually add certain units to the uses clause
or these capabilities will not appear in the application.
In the end-user reporting demo project (located in the ...\RBuilder\Demos\1.
Report Explorer directory), the main unit is a form entitled myEURpt. At
the top of the unit for this form there is a series of conditional compiler
directives which, when enabled, cause certain functionality to appear in the
application. The conditional compiler directives in this unit are an
attempt to simplify the configuration of the demo application. However,
these directives do nothing more than add or omit certain unit names from
the uses clause of the form. The important thing to know is the unit names
and the functionality that including those unit names will provide. The
table below provides this information.
Unit Name Feature
---------- -------------------------------------------------------------
--
daIDE DADE user-interface ('Data' tab)
raIDE RAP user-interface ('Calc tab)
ppCTDsgn User-interface for the configuration of the crosstab.
Normally the Crosstab Designer is displayed by accessing the
'Configure...' context menu option of a crosstab component.
If this unit is not included then this menu option is not
displayed.
myChkBox Checkbox components appear on the component palette when this unit
is
included. If you want to check out the source for these
components it
is in ...RBuilder Pro 4\Demos\RCL
ppChrtUI User-interface for editing charts. Normally the chart editor
is displayed by accessing the 'Edit...' context menu
option of a chart component.
If this unit is not included then this menu option is not
displayed.
ReportBuilder also uses the unit registration scheme to control which
database connectivity options are provided by the application. While
including the daDatMan unit will cause the 'Data' workspace to appear in the
Report Designer, that workspace will not be functional without a supporting
implementation. In ReportBuilder we call these implementations DADE
plug-ins. A DADE plug-in is nothing more than a Delphi unit which contains
the appropriate descendant class implementations needed by DADE to
communicate with a given database. Placing the data access implementation
in a separate unit gives us at least two benefits. One is that the user int
erface is not tied to any specific database connectivity scheme. The other
is that the overhead associated with database support is limited to the
database connectivity products you are actually using. This means that if
you are using ADO to access your data, you need only include the daADO unit
in your uses clause and your application will use ADO only. Most developers
use DADE plug-ins to gain access to databases not supported by the BDE, or
to gain access to databases without the use of the BDE. The following DADE
plug-ins are provided with ReportBuilder Pro:
Unit Name Feature
---------- ----------
daDBBDE BDE support for the Query Wizard and Query Designer
daADO ADO support for the Query Wizard and Query Designer
daIBExpress Interbase Express support for the Query Wizard and Query
Designer.
daADS Advantage support.
daDOA Oracle support via the Direct Oracle Access components.
daODBC98 ODBC support via the ODBC98 components.
daIBO InterBase support via the InterBase Objects components.
daDBISAM DBISAM support.
You can use DADE plug-ins at Delphi design-time by generating a package
which contains one of these units and then installing it into Delphi. This
will allow you to use your preferred database product within the 'Data'
workspace at Delphi design-time. You can locate the various DADE plug-in
units in the ...\RBuilder\ Demos\EndUser Databases directories. A Delphi
package project has been provided for each DADE implementation so that you
can generate and install the plug-in at Delphi design-time. For more
information on how this can be done, see the ReadMe files in the EndUser
Databases directories.
Additional DADE Plug-ins are always being developed. Check the Digital
Metaphors web-site for the latest information (see the section
Friends:Data:DADE Plug-Ins.)
--
Tech Support mailto:support@digital-metaphors.com
Digital Metaphors http://www.digital-metaphors.com
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for your answer.
So, I just need to add the unit ppChrtUI.
Now I get a compile error, delphi can't find IEditCha.dcu
Do I absolutly need the TeeChart source code ?
--
Merci
--
Serge Chelli
www.aceinformatique.com
www.cactusvision.com
www.securisave.com
www.e-fastmag.com
www.ipscript.com
If you are getting an 'IEdiCha' error message when you try to compile a
project that contains TeeChart functionality, then TeeChart is probably
installed correctly. In order to get around this error message you must
either compile your project with packages or purchase the registered version
of TeeChart from www.teemach.com.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
"Unable to load OnPrint code for DPTeeChart1, no object with this name
found.
I am using Delphi5 and RB 7.1
Thanks
--
Serge Chelli
www.aceinformatique.com
www.cactusvision.com
www.securisave.com
www.e-fastmag.com
www.ipscript.com
You are receiving this error because the compiler cannot find an event
handler you have assigned. Please see the article below on lost event
handlers.
--------------------------------------------
Article: Troubleshooting Lost Event Handlers
--------------------------------------------
Let's assume you have created a report in Delphi and assign an event
handlers to the OnPreviewFormCreate event of the report. The event is
generated by Delphi as:
procedure TForm1.ppReport1PreviewFormCreate(Sender: TObject);
You then save the report to an RTM file 'Report1.RTM.' The events are
stored as references only, and so the RTM contains:
object ppReport1: TppReport
.
.
OnPreviewFormCreate = ppReport1PreviewFormCreate
end
You then go on to work on a different report. Saving it with under then
name 'Report2.RTM'. Only this time, before you save the report you change
the report component name to: rptOrders. Delphi automatically updates the
event declaration for OnPreviewFormCreate event to:
procedure TForm1.rptOrdersPreviewFormCreate(Sender: TObject);
You then create two buttons on the form, one to load Report1 and preview,
the other to load Report2 and preview. When you run the app and click
Report1, you an error. This is because the Report1.RTM file contains a
reference to ppReport1PreviewFormCreate, a method which no longer exists (at
least with this name) in the form.
One answer is to load all your rtm files into the report component you will
be using for loading. Fix any errors, reassign any events that get cleared.
This will update your rtms to contain the proper event handler names.
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com