Draw "freely"
Hi List,
I want to create a field on the report which then contains a cross
(something like a checkbox).
I thought I could juste use a Shape component and then use the Canvas and
it's MoveTo/LineTo methods but there is no Canvas to access.
How can I achive this?
I don't want to use a Label component and just display an "x".
Any help is appreciated.
Kind regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
I want to create a field on the report which then contains a cross
(something like a checkbox).
I thought I could juste use a Shape component and then use the Canvas and
it's MoveTo/LineTo methods but there is no Canvas to access.
How can I achive this?
I don't want to use a Label component and just display an "x".
Any help is appreciated.
Kind regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
This discussion has been closed.
Comments
Each component does not draw to its own individual canvas. One option you
may consider is creating a TBitmap or TMetaFile object and using its canvas
property to draw the "x" manually. Then you can load this image into a
TppImage component on a report.
We are strongly considering adding a "Paint Box" component to ReportBuilder
for the next major release which would give you access to canvas object for
manual drawing.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Is it possible to use a checkbox in a report?
Regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
Where should I create the TBitmap/TMetaFile? Which event should I use?
Do I need to save the TBitmap/TMetaFile Object to a file before it can be
loaded into the report?
I think that this would be a great idea!
Regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
I just tried to create a TBitmap object and access it's Canvas object.
This seems to be impossible from within RAP because of the following error:
procedure HeaderBeforeGenerate;
var
Bitmap: TBitmap;
begin
Bitmap := TBitmap.Create;
Bitmap.Canvas;
end;
Error: HeaderBeforeGenerate, Row 6: Expected '(' or '[' but found 'Canvas'.
How should I access and paint on the Canvas then?
--- posted by geoForum on http://delphi.newswhat.com
Yes, you should see a DBCheckbox component in the report designer along with
the other data aware controls. There is also a none data aware version.
Regards, Paul.
Yes, in order to accomplish what you need in RAP, the following code would
need to be placed in a pass-thru function. The TBitmap object is not
supported in RAP. An example of creating a RAP pass-thru function can be
found in the RAP demos.
I would first suggest taking a look at the CheckBox component as Paul has
mentioned. I originally assumed you had already tried it and it wouldn't
work for your needs being that it is included with the product.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Go into your installed packages list in the Delphi IDE and be sure the
"ReportBuilder Sample Components" entry is present and checked. This should
be the \RBuilder\Lib\dclRBU10x.bpl package.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
I'm using the "ReportBuilder Enterprise Edition "Version 10.06", but the
only data aware controls I see are the following:
DBText, DBMemo, DBRichText, DBCalc, DBImage, DBBarCode and DB2DBarCode
I enabled all toolbars in the menu.
Regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
The package is installed and checked. When I take a look at the
TppDesigner Object on my form the "ShowComponents" property has the
following assigned:
[scLabel,scMemo,scRichText,scCalc,scImage,scShape,scLine,scBarCode,scTeeChart,scDBText,scDBMemo,scDBRichText,scDBCalc,scDBImage,scDBBarCode,scDBTeeChart,scRegion,scSubReport,scSystemVariable,scVariable,scPageBreak,sc2DBarCode,scDB2DBarCode]
When I extend the property using the plus in front of it, every possible
entry is checked (true).
I don't see the tee chart either btw.
Am I missing something? A setting which is (un-)checked?
Regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
If these packages are installed in the IDE (Sample components and TeeChart),
they should show up in the designer standard and data toolbars at
designtime. Try unchecking them and rechecking them. If this does not
help, you may need to reinstall ReportBuilder.
If you would like to use these at runtime, you will need to add the proper
units to the uses clause to enable the features.
------------------------------------------------------------
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
interface 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.)
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Set Checkbox.Style to csXInBox or csXMark
--
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
thank you very much for the information.
That was exactly what was missing to get the components shown in the toolbar.
But, while the checkbox is nice I need a variant with a cross instead of a
check, so I'm right at the beginning...
Regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com
Thank you very much, that's exactly what I was looking for - should've
found it by myself... *cough*
Thank you all for the tips and information!
Regards,
Christoph
--- posted by geoForum on http://delphi.newswhat.com