<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
    xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Component Writing — ReportBuilder Support Forums</title>
        <link>https://www.digital-metaphors.com/forums/</link>
        <pubDate>Wed, 11 Mar 2026 12:44:27 +0000</pubDate>
        <language>en</language>
            <description>Component Writing — ReportBuilder Support Forums</description>
    <atom:link href="https://www.digital-metaphors.com/forums/categories/component-writing/feed.rss" rel="self" type="application/rss+xml"/>
    <item>
        <title>Feature Request: Enhancement for Rectangle Component</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21933/feature-request-enhancement-for-rectangle-component</link>
        <pubDate>Wed, 11 Sep 2024 06:57:53 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>microtronx</dc:creator>
        <guid isPermaLink="false">21933@/forums/discussions</guid>
        <description><![CDATA[Hi,

We have several custom reports where we need to consistently use rectangles and lines on the right, left, and other sides within the MainReport, subreports, etc.

Currently, we are using lines with `parentheight`, aligning them left for the left side and right for the right side. However, we are facing an issue where we cannot ensure that all lines are perfectly aligned. Even when we define the positions of the lines in the code, upon zooming into the PDF, some lines are off by 1px to the left or right, though not all of them, just a few.

To address this issue, I propose using a rectangle component instead of individual lines. However, for this to work, we need the ability to selectively control which sides of the rectangle are drawn. For example, we would need properties like:

component.drawtopline := false;
component.drawbottomline := false;

Or even better, a set property such as:

component.DrawLines := [dlLeft, dlRight];

Would it be possible for you to extend the default rectangle component with such functionality?

Thank you for your consideration!

]]>
        </description>
    </item>
    <item>
        <title>Not able to edit the Report builder SQL</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21735/not-able-to-edit-the-report-builder-sql</link>
        <pubDate>Wed, 25 Jan 2023 12:15:06 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rajeev_kumar</dc:creator>
        <guid isPermaLink="false">21735@/forums/discussions</guid>
        <description><![CDATA[Hi,
We have migrated our application from delphi 4 to delphi 10.4. In delphi 4 we were using BDE and migrated it with Firedac in Delphi 10.4. For Delphi 10.4, using report builder 21.05 in our delphi application.In delphi 10.4 with Report builder 21.05, When we try to open the report and edit the sql of report and save it we are getting following error While in delphi 4 with BDE we are able to edit and save the updated SQL. 
 
---------------------------
SQL
---------------------------
Invalid SQL statement.

TdaFireDACDataSet.GetFieldsForSQL: Database property is nil
---------------------------
OK   
---------------------------

I have attached the image "img2.JPG" below:

https://github.com/rajeevgl31/stats

I have recorded the video with filename huk-xfsn-khx to replicate the issue:
https://github.com/rajeevgl31/stats]]>
        </description>
    </item>
    <item>
        <title>Missing Query Wizard and Query Designer</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21734/missing-query-wizard-and-query-designer</link>
        <pubDate>Wed, 25 Jan 2023 07:09:23 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rajeev_kumar</dc:creator>
        <guid isPermaLink="false">21734@/forums/discussions</guid>
        <description><![CDATA[Hi,

We have migrated our application from Delphi 4 to Delphi 10.4. In our application for report we are using updated report builder in Delphi 10.4. In old application (Delphi 4) ,When we try to create a new report from our application and go to Data tab  then click on File-&gt;New , A window opens which contains Query Wizard and Query Designer as attached in image. While in new report builder we are not able to see this.

<img src="https://lens.google.com/search?p=AfVzNa-u99B7k_eop5rRH1_SubB9Lko9M037nVpZd4JTblFT5Wdfla24vjhVzuuG5Q9uMxYoVP4xiVApvXYO6KvmOuaYQr4LkAI1gIdJxKdEOUl1UcgGHLvG5kph8PLzJy8fYV6beloaGJZ3f20YpCauoo8Yqqz2MLw9wTW1RJYKqklfzip1QMn3LHq17tXWmVnxHdJ7cFLBhhI5I-1s3nLfKiFjR2sk076kUIAELY34D-m3bO01mb_tsL5CzOUEJkZVIy-wqFawGxo75uqFV9Sztdi71NwiIVeFDlx6LjhPVA9jFqebSfSThKhUbByLyHplAkJD0QCrWix14Os%3D&amp;ep=gisbubb&amp;hl=en-IN&amp;re=df&amp;pli=1#lns=W251bGwsbnVsbCxudWxsLG51bGwsbnVsbCxudWxsLG51bGwsIkVrY0tKR00yWldGbE1tSmtMVEEzTVRFdE5EYzFaaTFoTkRjNExUY3dOREJqWW1SaU5tWXhOaElmUlY5MFNXTkNORzF2YmpSa1dVeHVaVFo2U1ROWFNFOXNlblp3TjFob1p3PT0iXQ==" alt="image" />]]>
        </description>
    </item>
    <item>
        <title>Label9OnGetText &quot; is not a valid Integer value</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21731/label9ongettext-is-not-a-valid-integer-value</link>
        <pubDate>Fri, 13 Jan 2023 09:25:48 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rajeev_kumar</dc:creator>
        <guid isPermaLink="false">21731@/forums/discussions</guid>
        <description><![CDATA[Hi,
 I am getting this message when trying to print report..... ( Could not run program: Label9OnGetText " is not a valid Integer value )...... how can I fix this????? 
Below is the code of label9ongettext. please thanks 
object raProgramInfo2: TraProgramInfo 
raClassName = 'TraEventHandler' 
raProgram.ProgramName = 'Label10OnGetText' 
raProgram.ProgramType = ttProcedure 
raProgram.Source = 'procedure Label10OnGetText(var Text: String);'#13#10'begin'#13#10#13#10' Text' + ' := (IntToStr(StrToInt(DBCalc1.Text) +'#13#10' '#9' StrTo' + 'Int(DBCalc2.Text) +'#13#10' StrToInt(DBCalc3.Text' + ')) ;'#13#10#13#10'end;'#13#10 
raProgram.ComponentName = 'Label10' 
raProgram.EventName = 'OnGetText' raProgram.EventID = 53 end 
Thanks Rajeev]]>
        </description>
    </item>
    <item>
        <title>Assigning three values with a single IF</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21699/assigning-three-values-with-a-single-if</link>
        <pubDate>Wed, 12 Oct 2022 10:46:37 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>ayd</dc:creator>
        <guid isPermaLink="false">21699@/forums/discussions</guid>
        <description><![CDATA[<b>Hello,

In a hospital software, reports are written with Report Builder. Extension .rtm

My question is

How can I use what I need to do after Then in a single if?
If if is ok, I want all the ones below to be false.</b>

<i>When I use begin - end I get the error Line 1: Expected: 'repeat' or 'while', but found 'begin' instead.</i>

<pre><code> if DBPipeline['ACCOUNT'] = 'NWM'
then
NucleusCB.Visible := False;
WindowsCB.Visible := False;
MailCB.Visible := False;</code></pre>
]]>
        </description>
    </item>
    <item>
        <title>TppRafMerge and duplex</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21685/tpprafmerge-and-duplex</link>
        <pubDate>Wed, 17 Aug 2022 14:09:11 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>mgm_entw</dc:creator>
        <guid isPermaLink="false">21685@/forums/discussions</guid>
        <description><![CDATA[Long times ago, we modified the TrbRAFMerge for printing with duplex.
If the frist report has 3 pages we add a empty page and then we add the next report.
Can you add this functionality to your TppRafMerge?

  TrbRAFMerge = class
  private
    FAbsolutePageCount: Integer;
    FDeleteSourceFiles: Boolean;
    FDestinationFile: string;
    FmgmUsePrinterSetup: Boolean;
    FmgmPrinterSetup: TppPrinterSetup;

    FRenumberPages: Boolean;
    FSourceFiles: TStringList;
    FTag: Integer;
    function GetSourceFilesCount: Integer;
  public
    constructor Create; virtual;
    destructor Destroy; override;
    procedure DeleteDestinationFile;
    procedure Execute;
    procedure mgmAddSourceFile(AFileName: TFileName; ADuplexWithNextFile: Boolean);
    procedure mgmInit;
    property AbsolutePageCount: Integer read FAbsolutePageCount;
    property DeleteSourceFiles: Boolean read FDeleteSourceFiles write FDeleteSourceFiles;
    property DestinationFile: string read FDestinationFile write FDestinationFile;
    property mgmUsePrinterSetup: Boolean read FmgmUsePrinterSetup write FmgmUsePrinterSetup;
    property mgmPrinterSetup: TppPrinterSetup read FmgmPrinterSetup write FmgmPrinterSetup;
    property RenumberPages: Boolean read FRenumberPages write FRenumberPages;
    property SourceFilesCount: Integer read GetSourceFilesCount;
    property Tag: Integer read FTag write FTag;
  end;

implementation

uses
  ppDevice;

constructor TrbRAFMerge.Create;
begin
  inherited Create;
  FmgmUsePrinterSetup := False;
  FmgmPrinterSetup    := TppPrinterSetup.Create(nil);
  FRenumberPages := False;
  FSourceFiles   := TStringList.Create;
  FTag           := 0;
end;

procedure TrbRAFMerge.DeleteDestinationFile;
var
  LsTempFile: string;
begin
  if FileExists(FDestinationFile) then begin
    DeleteFile(FDestinationFile);
  end;
  LsTempFile := ChangeFileExt(FDestinationFile, '.tmp');
  if FileExists(LsTempFile) then begin
    DeleteFile(LsTempFile);
  end;
end;

destructor TrbRAFMerge.Destroy;
begin
  FreeAndNil(FmgmPrinterSetup);
  FSourceFiles.Free;
  FSourceFiles := nil;
  inherited Destroy;
end;

procedure TrbRAFMerge.Execute;
var
  LoArchiveReader: TppArchiveReader;
  LoArchiveDevice: TppArchiveDevice;
  LbDoublexNewPage: Boolean;
  LiIndex: Integer;
  LoPage: TppPage;
begin
  // create arcive reader
  LoArchiveReader := TppArchiveReader.Create(nil);

  // create archive device
  LoArchiveDevice := TppArchiveDevice.Create(nil);
  LoArchiveDevice.Publisher := LoArchiveReader.Publisher;
  LoArchiveDevice.FileName  := FDestinationFile;
  try
    // for each source file, generate pages
    for LiIndex := 0 to FSourceFiles.Count - 1 do begin
      LbDoublexNewPage := (Integer(FSourceFiles.Objects[LiIndex]) = 1);
      if LbDoublexNewPage and (LiIndex &lt;&gt; 0) and (Odd(FAbsolutePageCount)) then begin
        LoPage := TppPage.Create(nil);
        LoPage.Final := True;
        LoPage.AbsolutePageNo := 1;
        //LoPage.PageDef.Assign();
        LoArchiveDevice.ReceivePage(LoPage);
        FreeAndNil(LoPage);
      end;
      LoArchiveReader.ArchiveFileName := FSourceFiles[LiIndex];
      LoArchiveDevice.StartPrintJob := (LiIndex = 0);
      LoArchiveDevice.EndPrintJob   := (LiIndex = FSourceFiles.Count-1);
      LoArchiveReader.PrintToDevices;
      FAbsolutePageCount := FAbsolutePageCount + LoArchiveReader.ArchivePageCount;
    end;
  finally
    // free archive device
    LoArchiveDevice.Free;
    // free archive reader
    LoArchiveReader.Free;
  end;

  // delete source files, if needed
  if FDeleteSourceFiles then begin
    for LiIndex := 0 to FSourceFiles.Count - 1 do begin
      DeleteFile(FSourceFiles[LiIndex]);
    end;
  end;
end;

function TrbRAFMerge.GetSourceFilesCount: Integer;
begin
  Result := FSourceFiles.Count;
end;

procedure TrbRAFMerge.mgmAddSourceFile(AFileName: TFileName;
  ADuplexWithNextFile: Boolean);
begin
  if ADuplexWithNextFile then begin
    FSourceFiles.AddObject(AFileName, TObject(1))
  end else begin
    FSourceFiles.AddObject(AFileName, TObject(0));
  end;
end;

procedure TrbRAFMerge.mgmInit;
begin
  FSourceFiles.Clear;
  FDeleteSourceFiles := False;
  FAbsolutePageCount := 0;
end;]]>
        </description>
    </item>
    <item>
        <title>Something wrong with printing svg image</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21613/something-wrong-with-printing-svg-image</link>
        <pubDate>Mon, 28 Feb 2022 17:39:15 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>Vince21</dc:creator>
        <guid isPermaLink="false">21613@/forums/discussions</guid>
        <description><![CDATA[Hello !

First, apologise for my bad english but, i need help to understand how works printing system.

to improve our printing quality, we have developped vector drawing to replace old bmp.

When we print our report, we load in run time the generated files as .svg before send the job to the printer, but all drawing are missing  whereas when we print in a pdf, they are there.

We can print vector pdf without any problem.

Some <u>options </u> in tppReport or tppImage which can be the problem ?

<u>tppImage </u>
<b>DirectDraw </b>= <i>True</i>
<b>Transparent </b>= <i>False</i>

thx :)

]]>
        </description>
    </item>
    <item>
        <title>Upgrading from 4 to 21 - Copies no more exist?</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21590/upgrading-from-4-to-21-copies-no-more-exist</link>
        <pubDate>Thu, 20 Jan 2022 05:14:35 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>Ivan</dc:creator>
        <guid isPermaLink="false">21590@/forums/discussions</guid>
        <description><![CDATA[After compiling I get the following error:
E2003 Undeclared identifier: 'Copies'

Should I use another property?]]>
        </description>
    </item>
    <item>
        <title>Zooming while in edition</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21582/zooming-while-in-edition</link>
        <pubDate>Wed, 15 Dec 2021 08:54:05 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>Vince</dc:creator>
        <guid isPermaLink="false">21582@/forums/discussions</guid>
        <description><![CDATA[Hello,
Sorry for this simple question: how to zoom in and out while editing a component ? I can't find any zooming tool in my v14.8 edition]]>
        </description>
    </item>
    <item>
        <title>TppBetweenSearchPanel</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21454/tppbetweensearchpanel</link>
        <pubDate>Mon, 08 Feb 2021 13:10:48 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>swright_hsl</dc:creator>
        <guid isPermaLink="false">21454@/forums/discussions</guid>
        <description><![CDATA[Hello,

I have a client that i need to enforce restrictions as to what values they can select from the report search panels.

So i have created a class of soEqual etc that gives them a combobox selection instead of free entry.

I am creating a class for InList that does similar, restricted subset of values in combo box to add to list, which is ok.

My question is for the Between search panel,  for example if a user has access to field values 100,200,300 then if they select from 100 to 300 they would get values inbetween which they are not allowed to see.

So is it possible to change the autosearch "SearchOperator" field at runtime, so if a report autosearch as a between field, then when getting the panel class can i change the class to soInList so they can only specify from a list of allowed values?

GetPanelClassForField aField parameter is not var, so can it be changed and where please?]]>
        </description>
    </item>
    <item>
        <title>ppDBRichView property Document does not exist</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21363/ppdbrichview-property-document-does-not-exist</link>
        <pubDate>Wed, 15 Jul 2020 08:07:50 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>Tebele</dc:creator>
        <guid isPermaLink="false">21363@/forums/discussions</guid>
        <description><![CDATA[Hi

We use Report Builder v12 with Delphi 2010 and Richview v18 at our company. We have been using an older version of richview, and we just upgraded to version 18. Since the upgrade we have been getting "ppDBRichView property Document does not exist" error when we are loading an old report.

We understand that opening the report design dialog and resaving the report removes the property and the error goes away.The problem is that we have a lot of clients with custom reports, and it would be difficult to go through each and every report for every client.

Can you please advice on any other alternative to fix this issue.

Thanks.]]>
        </description>
    </item>
    <item>
        <title>How to save a two-dimensional code or bar code as a picture?</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21113/how-to-save-a-two-dimensional-code-or-bar-code-as-a-picture</link>
        <pubDate>Mon, 13 May 2019 10:11:51 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>sxs</dc:creator>
        <guid isPermaLink="false">21113@/forums/discussions</guid>
        <description><![CDATA[How to save a two-dimensional code or bar code as a picture?


Thank you very much.]]>
        </description>
    </item>
    <item>
        <title>Custom component rendering on subreports</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21042/custom-component-rendering-on-subreports</link>
        <pubDate>Wed, 12 Dec 2018 21:55:21 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>tommyd</dc:creator>
        <guid isPermaLink="false">21042@/forums/discussions</guid>
        <description><![CDATA[Greetings,

I have a custom component that uses TCollection and TCollectionItems. It renders just fine in the designtime and runtime print previewers on a one page report with thumbnails visible. It won't render on the print previewers if it is on a subreport unless I set the previewformsettings.singlepageonly to true. This, of course, does not allow thumbnails in the previewer. It renders just fine to the printer in any case.

What steps must I take in order for the component to render on a subreport in the previewrs with thumbnails?

Best Regards,
Tommy]]>
        </description>
    </item>
    <item>
        <title>add or use email button</title>
        <link>https://www.digital-metaphors.com/forums/discussion/21024/add-or-use-email-button</link>
        <pubDate>Fri, 16 Nov 2018 19:18:48 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>dogtwotrees</dc:creator>
        <guid isPermaLink="false">21024@/forums/discussions</guid>
        <description><![CDATA[we have some library code for sending email, I wish to use this code in place of the email button OnClick event that is added to the previewer when email has been enabled that is ppReport1.EmailSettings.Enabled  := True;

how can I assign our own event to EmailButton.OnClick

if Assigned(EmailButton) then
  EmailButton.OnClick = OurEmailEvent

or how can I add a button to the previewer]]>
        </description>
    </item>
    <item>
        <title>Report Preview email button click event</title>
        <link>https://www.digital-metaphors.com/forums/discussion/20998/report-preview-email-button-click-event</link>
        <pubDate>Wed, 03 Oct 2018 13:18:12 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>marcocunhasilva</dc:creator>
        <guid isPermaLink="false">20998@/forums/discussions</guid>
        <description><![CDATA[Good Morning!

When viewing a report and checking that everything is correct, I click the "EMAIL" button but it is not opening the default mail client in Windows 10. I need to debug the "EMAIL" button event, but I do not know what the event is. I hope I have been clear in my doubt. Thanks in advance for the attention of all and I await.

ReportBuilder 12.03

See you later.]]>
        </description>
    </item>
    <item>
        <title>Custom SQL Text Editor/Visual Query Builder</title>
        <link>https://www.digital-metaphors.com/forums/discussion/20838/custom-sql-text-editor-visual-query-builder</link>
        <pubDate>Wed, 28 Mar 2018 07:34:16 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>ssmagin</dc:creator>
        <guid isPermaLink="false">20838@/forums/discussions</guid>
        <description><![CDATA[Hello,

Can you point me to the documentation how can I add a custom facility to let end-users edit SQL queries in the report designer? Basically, all I need is an event handler that will be fired when customer requests to edit a query. In this handler, I must get the current SQL text, display a dialog in which my query will be edited and pass the new/modified SQL query back to the report builder. Is it possible to do in Report Builder or is there a better way of integrating my text/visual SQL editor into the report designer?

Delphi: RAD Studio 10.2.3, Report Builder version: the latest, OS: Windows, Printer: doesn't matter.

Thank you in advance for prompt response.]]>
        </description>
    </item>
    <item>
        <title>Changing class inheritance</title>
        <link>https://www.digital-metaphors.com/forums/discussion/342/changing-class-inheritance</link>
        <pubDate>Tue, 08 Dec 2015 08:54:09 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">342@/forums/discussions</guid>
        <description><![CDATA[Hi,

in Version 5.56 we used TSpecialRichtext=class((TppDBRichText), as the 
texts are stored statically in our DB.
After my investigations now I have to they that this decision of our 
system-architecture was and is wrong.
Normally it should be TSpecialRichtext=class((TppRichText).
I can made these code changes, but I do not know what happens with our
reports when migratin from 5.56 to 16.03 including this change?

Will reports containing old TSpecialRichtext still work with the new 
implementation. I assume, but can anyone confirm?

Tia Carsten
]]>
        </description>
    </item>
    <item>
        <title>Subclassing TppDBRichtext</title>
        <link>https://www.digital-metaphors.com/forums/discussion/343/subclassing-tppdbrichtext</link>
        <pubDate>Thu, 03 Dec 2015 09:16:39 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">343@/forums/discussions</guid>
        <description><![CDATA[Hi,

we have a component that inherits from TppDBRichtext.
On Creating the component we set caption:='Adam'.
Within the designer a box with the caption is draw.
Setting some properties allows us to read a rtf-string from our 
database within "ongetRichtext".
The richtext is succesfully read from database, but
self.richtext=dbdata or self.text=dbdata doesnot work.
The component still displays its caption.

1.) What is the relation between caption,text and richtext?
2.) Is my rtf string wrong:

'{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 Segoe 
UI;}{\f1\fnil Segoe UI;}}'#$D#$A'{\*\generator Msftedit 
5.41.21.2510;}\viewkind4\uc1\pard\lang1031\ul\i\f0\fs18 
Non-\ulnone\i0\par'#$D#$A'\b sens\b0\f1\par'#$D#$A'}'#$D#$A#0

We are trying to use RB16.03, coming from 5.56 this code worked n 
fomrer times

Any ideas?
]]>
        </description>
    </item>
    <item>
        <title>Custom Memo Component</title>
        <link>https://www.digital-metaphors.com/forums/discussion/344/custom-memo-component</link>
        <pubDate>Mon, 20 Jan 2014 05:19:17 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">344@/forums/discussions</guid>
        <description><![CDATA[Do you know which event I would use if I want to add a property to a 
memo component to switch n/a to blank?  I have something similar in a 
custom DbText component, but did not see a GetTheText Event for the memo.

Thanks
]]>
        </description>
    </item>
    <item>
        <title>Use custom icon on own component</title>
        <link>https://www.digital-metaphors.com/forums/discussion/345/use-custom-icon-on-own-component</link>
        <pubDate>Thu, 21 Nov 2013 14:19:32 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">345@/forums/discussions</guid>
        <description><![CDATA[Hello,

with the following code i added an own component to designer toolbar.

ppRegisterComponent(TMyVariable, 'Standard Components', 11, 0,
  MyVariable', 0);

Can I have for my component an custom icon like on Label, Checkbox, etc. ?

I analyse the code of the checkbox but i didn't found anything with an icon.

Sincerely

Christian
]]>
        </description>
    </item>
    <item>
        <title>Export table in file doc</title>
        <link>https://www.digital-metaphors.com/forums/discussion/346/export-table-in-file-doc</link>
        <pubDate>Mon, 14 Oct 2013 08:59:49 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">346@/forums/discussions</guid>
        <description><![CDATA[Hi,
i need to know if exists a component to export tables from report builder to 
file .doc with delphi XE.

Thanks. 
]]>
        </description>
    </item>
    <item>
        <title>Custom Component Format Question</title>
        <link>https://www.digital-metaphors.com/forums/discussion/347/custom-component-format-question</link>
        <pubDate>Thu, 14 Mar 2013 08:00:08 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">347@/forums/discussions</guid>
        <description><![CDATA[Is there a way to change the allowed formats in a custom component?

In other words, if you have a numeric field, you get formats for 
numbers.  Text fields have phone number, date, etc.  Can this be changed 
to whatever I want if I have a custom component?  If so how?

11.08 enterprise,  Delphi 2010

Thanks.
]]>
        </description>
    </item>
    <item>
        <title>Don't delete file when a email sending failure occur</title>
        <link>https://www.digital-metaphors.com/forums/discussion/348/dont-delete-file-when-a-email-sending-failure-occur</link>
        <pubDate>Thu, 24 Jan 2013 00:49:38 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">348@/forums/discussions</guid>
        <description><![CDATA[Hello,
is there any property in email settings that doesn't delete the 
generated report when occur a error after sending an email?

Your Sincerely
Christian
]]>
        </description>
    </item>
    <item>
        <title>Example Component with custom properties</title>
        <link>https://www.digital-metaphors.com/forums/discussion/349/example-component-with-custom-properties</link>
        <pubDate>Wed, 16 Jan 2013 12:46:39 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">349@/forums/discussions</guid>
        <description><![CDATA[Do you have an example component that saves custom properties (like a 
Table Name and FIeld Name.

I am trying to create a component with a popup dialog that has several 
fields the user will fill out.  (TableName, FieldName, etc).  Then a 
numeric value would be printed.  I started with a label component, but 
can change that.  I also cannot get the new properties to save so when I 
close the report editor and go back in, they are gone.  I thought maybe 
an example would help.

THanks
]]>
        </description>
    </item>
    <item>
        <title>Checkbox with label</title>
        <link>https://www.digital-metaphors.com/forums/discussion/350/checkbox-with-label</link>
        <pubDate>Wed, 07 Nov 2012 05:00:07 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">350@/forums/discussions</guid>
        <description><![CDATA[Can you think of a way (or a good starting point) to have a new 
component that will combine the checkbox and a label.

Thanks
]]>
        </description>
    </item>
    <item>
        <title>TppInspectorSelectionData - SelectionControllor is nil.</title>
        <link>https://www.digital-metaphors.com/forums/discussion/351/tppinspectorselectiondata-selectioncontrollor-is-nil</link>
        <pubDate>Sun, 07 Oct 2012 20:13:33 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">351@/forums/discussions</guid>
        <description><![CDATA[Greetings,

RB 14.06 Build 284.

I have a custom RB component. It has some properties that is a list of properties that is preceeded with a '+' sign in the report designer object inspector. These properties can be changed without problem. However some of the sub properties is also a list of properties preceeded with a '+' sign. When I try to change these properties I get the following error: "TppInspectorSelectionData - SelectionControllor is nil."

If I go to, for example, the reports 'detail band' and click on 'background1-gradient-style' without changing the value I can then return to my component and I can then change the sub properties without an error.

Any direction/help would be greatly appreciated.

Tommy


--------------=  Posted using GrabIt  =----------------
------=  Binary Usenet downloading made easy =---------
-=  Get GrabIt for free from http://www.shemes.com/  =-
]]>
        </description>
    </item>
    <item>
        <title>14.05 Unable to load RTM Code</title>
        <link>https://www.digital-metaphors.com/forums/discussion/352/14-05-unable-to-load-rtm-code</link>
        <pubDate>Tue, 03 Jul 2012 10:55:18 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">352@/forums/discussions</guid>
        <description><![CDATA[Hi,

We have a report that works correctly in version 14.04 but displays this 
error in 14.05.
"Unable to load BeforePrint code for GroupFooterBand1, no object with this 
name found."

The GroupFooterBand1BeforePrint code is:

procedure GroupFooterBand1BeforePrint;
begin
  if Report.FirstPass then
    AllTotal.Add(FloatToStr(vTotal.Value));
end;

AllTotal: TStringList; is declared under Declarations Variables.

-Jack 
]]>
        </description>
    </item>
    <item>
        <title>DrawCommand Click Events</title>
        <link>https://www.digital-metaphors.com/forums/discussion/353/drawcommand-click-events</link>
        <pubDate>Mon, 14 May 2012 09:43:40 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">353@/forums/discussions</guid>
        <description><![CDATA[Hi,

The DrawCommandClickCustInfo.pas and dfm code below is modified version of 
the DrawCommandCustomInfoProj demo downloaded from the Wiki. The code worked 
properly prior to version 14 of RB. In version 14 clicking on the lines of 
the first page after loading the report works as expected, but after moving 
to the second page and then back to the first page the wrong info will 
display when clicked.

Thanks

-Jack

--------------------------------------------------------------------------------
//DrawCommandClickCustInfo.pas
unit DrawCommandClickCustInfo;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ppDB, ppDBPipe, Db, DBTables, ppPrnabl, ppClass, ppCtrls,
  ppBands, ppCache, ppComm, ppRelatv, ppProd, ppReport, ppParameter, 
ppDesignLayer, ppDrwCmd, ppDevice;

type
  TmyDrillDownDraw = class(TppDrawShape)
  private
    FKeyValue: Variant;
  protected
    procedure DrawClickEvent(Sender: TObject);
  public
    procedure Assign(Source: TPersistent); override;
    function EqualTo(aDrawCommand: TppDrawCommand): Boolean; override;
    constructor Create(AOwner: TComponent); override;
  published
    property KeyValue: Variant read FKeyValue write FKeyValue;
  end;

  TForm3 = class(TForm)
    ppReport1: TppReport;
    ppHeaderBand1: TppHeaderBand;
    ppDetailBand1: TppDetailBand;
    ppFooterBand1: TppFooterBand;
    ppDBText1: TppDBText;
    dsCustomer: TDataSource;
    tblCustomer: TTable;
    plCustomer: TppDBPipeline;
    Button1: TButton;
    Memo1: TMemo;
    ppDesignLayers1: TppDesignLayers;
    ppDesignLayer1: TppDesignLayer;
    ppDBText2: TppDBText;
    procedure Button1Click(Sender: TObject);
    procedure ppDetailBand1CreateDrawCommand(Sender, aPage: TObject);
  private
    procedure CreateDrawCommand;
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation

{$R *.DFM}

procedure TForm3.Button1Click(Sender: TObject);
begin
  ppReport1.Print;
end;

procedure TForm3.ppDetailBand1CreateDrawCommand(Sender, aPage: TObject);
begin
  CreateDrawCommand;
end;

procedure TForm3.CreateDrawCommand;
var
  ADraw: TmyDrillDownDraw;
begin
  ADraw := TmyDrillDownDraw.Create(ppReport1);
  ADraw.Page := ppReport1.Engine.Page;
  ADraw.Band := ppReport1.DetailBand;
  ADraw.Top := ppReport1.DetailBand.PrintPosRect.Top + 500;
  ADraw.Left := ppReport1.PrinterSetup.PageDef.mmMarginLeft;
  ADraw.Width := ppReport1.PrinterSetup.PageDef.mmPrintableWidth;
  ADraw.Height := ppReport1.DetailBand.mmHeight - 1000;
  ADraw.Pen.Style := psClear;
  ADraw.Brush.Style := bsClear;
  ADraw.Clickable := True;
  ADraw.KeyValue := ppReport1.DataPipeline.FieldValues['CustNo'];
end;

{ TmyDrillDownDraw }

procedure TmyDrillDownDraw.Assign(Source: TPersistent);
var
  lDrawCommand: TmyDrillDownDraw;
begin
  inherited Assign(Source);

  if not(Source is TmyDrillDownDraw) then
    Exit;

  lDrawCommand := TmyDrillDownDraw(Source);
t  FKeyValue := lDrawCommand.KeyValue;
end;

constructor TmyDrillDownDraw.Create(AOwner: TComponent);
begin
  inherited Create(AOwner);

  OnClick := DrawClickEvent;
end;

procedure TmyDrillDownDraw.DrawClickEvent(Sender: TObject);
begin
  ShowMessage('Cumpany: ' + string(KeyValue));
end;

function TmyDrillDownDraw.EqualTo(aDrawCommand: TppDrawCommand): Boolean;
begin
  Result := inherited EqualTo(aDrawCommand);

  if aDrawCommand is TmyDrillDownDraw then
    Result := Result and (FKeyValue = 
TmyDrillDownDraw(aDrawCommand).KeyValue);
end;

initialization

RegisterClasses([TmyDrillDownDraw]);

finalization
UnRegisterClasses([TmyDrillDownDraw]);

end.

//DrawCommandClickCustInfo.dfm
object Form3: TForm3
  Left = 209
  Top = 107
  Caption = 'Draw Command Click Info'
  ClientHeight = 220
  ClientWidth = 404
  Color = clBtnFace
  Font.Charset = DEFAULT_CHARSET
  Font.Color = clWindowText
  Font.Height = -11
  Font.Name = 'MS Sans Serif'
  Font.Style = []
  OldCreateOrder = False
  Position = poScreenCenter
  PixelsPerInch = 96
  TextHeight = 13
  object Button1: TButton
    Left = 157
    Top = 178
    Width = 75
    Height = 25
    Caption = 'Preview'
    TabOrder = 0
    OnClick = Button1Click
  end
  object Memo1: TMemo
    Left = 38
    Top = 15
    Width = 330
    Height = 141
    Enabled = False
    Lines.Strings = (
      'This example shows how to attach custom information to a draw  '
      'command.'
      ''
      'The Report.OnDrawCommandCreate and OnDrawCommandClicked  '
      'events are used to store and retrieve the custom info.'
      ''
      'Preview the report, then click on the company names to display '
      'additional information.')
    TabOrder = 1
  end
  object ppReport1: TppReport
    AutoStop = False
    DataPipeline = plCustomer
    PrinterSetup.BinName = 'Default'
    PrinterSetup.DocumentName = 'Report'
    PrinterSetup.PaperName = 'Letter'
    PrinterSetup.PrinterName = 'Default'
    PrinterSetup.SaveDeviceSettings = False
    PrinterSetup.mmMarginBottom = 6350
    PrinterSetup.mmMarginLeft = 6350
    PrinterSetup.mmMarginRight = 6350
    PrinterSetup.mmMarginTop = 6350
    PrinterSetup.mmPaperHeight = 279401
    PrinterSetup.mmPaperWidth = 215900
    PrinterSetup.PaperSize = 1
    ArchiveFileName = '($MyDocuments)\ReportArchive.raf'
    DeviceType = 'Screen'
    DefaultFileDeviceType = 'PDF'
    EmailSettings.ReportFormat = 'PDF'
    LanguageID = 'Default'
    OutlineSettings.CreateNode = True
    OutlineSettings.CreatePageNodes = True
    OutlineSettings.Enabled = False
    OutlineSettings.Visible = False
    PDFSettings.EmbedFontOptions = []
    PDFSettings.EncryptSettings.AllowCopy = True
    PDFSettings.EncryptSettings.AllowInteract = True
    PDFSettings.EncryptSettings.AllowModify = True
    PDFSettings.EncryptSettings.AllowPrint = True
    PDFSettings.EncryptSettings.Enabled = False
    PDFSettings.FontEncoding = feAnsi
    PDFSettings.ImageCompressionLevel = 25
    PreviewFormSettings.WindowState = wsMaximized
    PreviewFormSettings.ZoomSetting = zsPageWidth
    RTFSettings.DefaultFont.Charset = DEFAULT_CHARSET
    RTFSettings.DefaultFont.Color = clWindowText
    RTFSettings.DefaultFont.Height = -13
    RTFSettings.DefaultFont.Name = 'Arial'
    RTFSettings.DefaultFont.Style = []
    TextFileName = '($MyDocuments)\Report.pdf'
    TextSearchSettings.DefaultString = ''
    TextSearchSettings.Enabled = False
    XLSSettings.AppName = 'ReportBuilder'
    XLSSettings.Author = 'ReportBuilder'
    XLSSettings.Subject = 'Report'
    XLSSettings.Title = 'Report'
    Left = 100
    Top = 177
    Version = '14.04'
    mmColumnWidth = 0
    DataPipelineName = 'plCustomer'
    object ppHeaderBand1: TppHeaderBand
      Background.Brush.Style = bsClear
      mmBottomOffset = 0
      mmHeight = 13229
      mmPrintPosition = 0
    end
    object ppDetailBand1: TppDetailBand
      OnCreateDrawCommand = ppDetailBand1CreateDrawCommand
      Background1.Brush.Style = bsClear
      Background2.Brush.Style = bsClear
      mmBottomOffset = 0
      mmHeight = 13229
      mmPrintPosition = 0
      object ppDBText1: TppDBText
        UserName = 'DBText1'
        DataField = 'Company'
        DataPipeline = plCustomer
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Name = 'Arial'
        Font.Size = 10
        Font.Style = []
        Transparent = True
        DataPipelineName = 'plCustomer'
        mmHeight = 3969
        mmLeft = 5821
        mmTop = 3440
        mmWidth = 58473
        BandType = 4
        LayerName = Foreground
      end
      object ppDBText2: TppDBText
        UserName = 'DBText2'
        DataField = 'CustNo'
        DataPipeline = plCustomer
        Font.Charset = DEFAULT_CHARSET
        Font.Color = clBlack
        Font.Name = 'Arial'
        Font.Size = 10
        Font.Style = []
        Transparent = True
        DataPipelineName = 'plCustomer'
        mmHeight = 3969
        mmLeft = 127529
        mmTop = 3440
        mmWidth = 17198
        BandType = 4
        LayerName = Foreground
      end
    end
    object ppFooterBand1: TppFooterBand
      Background.Brush.Style = bsClear
      mmBottomOffset = 0
      mmHeight = 13229
      mmPrintPosition = 0
    end
    object ppDesignLayers1: TppDesignLayers
      object ppDesignLayer1: TppDesignLayer
        UserName = 'Foreground'
        LayerType = ltBanded
      end
    end
    object ppParameterList1: TppParameterList
    end
  end
  object dsCustomer: TDataSource
    DataSet = tblCustomer
    Left = 38
    Top = 177
  end
  object tblCustomer: TTable
    Active = True
    DatabaseName = 'DBDEMOS'
    TableName = 'customer.db'
    Left = 7
    Top = 177
  end
  object plCustomer: TppDBPipeline
    DataSource = dsCustomer
    UserName = 'plCustomer'
    Left = 69
    Top = 177
    object plCustomerppField1: TppField
      Alignment = taRightJustify
      FieldAlias = 'CustNo'
      FieldName = 'CustNo'
      FieldLength = 0
      DataType = dtDouble
      DisplayWidth = 10
      Position = 0
    end
    object plCustomerppField2: TppField
      FieldAlias = 'Company'
      FieldName = 'Company'
      FieldLength = 30
      DisplayWidth = 30
      Position = 1
    end
    object plCustomerppField3: TppField
      FieldAlias = 'Addr1'
      FieldName = 'Addr1'
      FieldLength = 30
      DisplayWidth = 30
      Position = 2
    end
    object plCustomerppField4: TppField
      FieldAlias = 'Addr2'
      FieldName = 'Addr2'
      FieldLength = 30
      DisplayWidth = 30
      Position = 3
    end
    object plCustomerppField5: TppField
      FieldAlias = 'City'
      FieldName = 'City'
      FieldLength = 15
      DisplayWidth = 15
      Position = 4
    end
    object plCustomerppField6: TppField
      FieldAlias = 'State'
      FieldName = 'State'
      FieldLength = 20
      DisplayWidth = 20
      Position = 5
    end
    object plCustomerppField7: TppField
      FieldAlias = 'Zip'
      FieldName = 'Zip'
      FieldLength = 10
      DisplayWidth = 10
      Position = 6
    end
    object plCustomerppField8: TppField
      FieldAlias = 'Country'
      FieldName = 'Country'
      FieldLength = 20
      DisplayWidth = 20
      Position = 7
    end
    object plCustomerppField9: TppField
      FieldAlias = 'Phone'
      FieldName = 'Phone'
      FieldLength = 15
      DisplayWidth = 15
      Position = 8
    end
    object plCustomerppField10: TppField
      FieldAlias = 'FAX'
      FieldName = 'FAX'
      FieldLength = 15
      DisplayWidth = 15
      Position = 9
    end
    object plCustomerppField11: TppField
      Alignment = taRightJustify
      FieldAlias = 'TaxRate'
      FieldName = 'TaxRate'
      FieldLength = 0
      DataType = dtDouble
      DisplayWidth = 10
      Position = 10
    end
    object plCustomerppField12: TppField
      FieldAlias = 'Contact'
      FieldName = 'Contact'
      FieldLength = 20
      DisplayWidth = 20
      Position = 11
    end
    object plCustomerppField13: TppField
      FieldAlias = 'LastInvoiceDate'
      FieldName = 'LastInvoiceDate'
      FieldLength = 0
      DataType = dtDateTime
      DisplayWidth = 18
      Position = 12
    end
  end
end 
]]>
        </description>
    </item>
    <item>
        <title>List index out of bounds in inherited form</title>
        <link>https://www.digital-metaphors.com/forums/discussion/354/list-index-out-of-bounds-in-inherited-form</link>
        <pubDate>Mon, 20 Feb 2012 12:02:18 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">354@/forums/discussions</guid>
        <description><![CDATA[?I want migrate a old Delphi 6 project to Delphi XE2 and ReportBuilder 14. 

In my project I have a user component TReportBase inherited from
TppReport, there are 4 or 5 new properties I need. I have too a base form
TBaseForm with a TReportBase component and some other controls used in
many reports in the project.

This behaviour worked for me in Delphi 6, and, I tested too with good
results in Delphi 7 and Delphi 2007. But in Delphi XE2 I found problems in
Preview and in the Design.

When I add a Tpplabel I receive a List Index out of bounds error and this:


[500A3234]{rtl160.bpl  } System.Classes.TList.Insert (Line 3932,
"System.Classes.pas" + 5) + $1
[11CF1E98]{rbRCL1416.bpl} Ppclass.TppBand.AddObject + $84
[11CF5700]{rbRCL1416.bpl} Ppclass.TppComponent.SetBand + $54
[11BDCC80]{rbRCL1416.bpl} Ppctrls.TppCustomText.SetBand + $0
[11ED079A]{rbIDE1416.bpl}
Ppdesignworkspacecontroller.TppDesignWorkspaceController.AddComponent + $E6
[11ED17CA]{rbIDE1416.bpl}
Ppdesignworkspacecontroller.TppDesignWorkspaceController.ehWorkspace_MouseUp
+ $BA
[11AD6627]{rbRTL1416.bpl} Ppmulticast.TppMulticastEvent.Notify + $27
[11EBEF56]{rbIDE1416.bpl} Ppdesignerworkspace.TppWorkspace.MouseUp + $4A
[503331A8]{vcl160.bpl  } Vcl.Controls.TControl.DoMouseUp (Line 7448,
"Vcl.Controls.pas" + 2) + $28
[50333224]{vcl160.bpl  } Vcl.Controls.TControl.WMLButtonUp (Line 7461,
"Vcl.Controls.pas" + 9) + $6
[50332814]{vcl160.bpl  } Vcl.Controls.TControl.WndProc (Line 7204,
"Vcl.Controls.pas" + 91) + $6
[11FC6660]{rbIDE1416.bpl} Ppsynuedit.TSynEditPlugin + $70
[503369AB]{vcl160.bpl  } Vcl.Controls.TWinControl.IsControlMouseMsg (Line
9745, "Vcl.Controls.pas" + 1) + $9
[50337163]{vcl160.bpl  } Vcl.Controls.TWinControl.WndProc (Line 9976,
"Vcl.Controls.pas" + 152) + $6
[503367B8]{vcl160.bpl  } Vcl.Controls.TWinControl.MainWndProc (Line 9689,
"Vcl.Controls.pas" + 3) + $6
[500B5FCC]{rtl160.bpl  } System.Classes.MakeObjectInstance (Line 13921,
"System.Classes.pas" + 0) + $0
[504524EF]{vcl160.bpl  } Vcl.Forms.TApplication.ProcessMessage (Line
10164, "Vcl.Forms.pas" + 23) + $1
[50452532]{vcl160.bpl  } Vcl.Forms.TApplication.HandleMessage (Line 10194,
"Vcl.Forms.pas" + 1) + $4
[50452865]{vcl160.bpl  } Vcl.Forms.TApplication.Run (Line 10331,
"Vcl.Forms.pas" + 26) + $3

Can anybody help???

Thanks in advance.

lmir




--- posted by geoForum on http://www.newswhat.com
]]>
        </description>
    </item>
    <item>
        <title>Clickable DrawCommand click event not raised in version 14</title>
        <link>https://www.digital-metaphors.com/forums/discussion/355/clickable-drawcommand-click-event-not-raised-in-version-14</link>
        <pubDate>Wed, 08 Feb 2012 15:13:18 +0000</pubDate>
        <category>Component Writing</category>
        <dc:creator>rbuser</dc:creator>
        <guid isPermaLink="false">355@/forums/discussions</guid>
        <description><![CDATA[In the code below I add a Clickable ppDrawShape to the background of each 
detail band, in version 12 it worked properly. Since upgrading to 14 the 
OnClick event is not fired.

Thanks


unit DrawCommandClickCustInfo;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  StdCtrls, ppDB, ppDBPipe, Db, DBTables, ppPrnabl, ppClass, ppCtrls,
  ppBands, ppCache, ppComm, ppRelatv, ppProd, ppReport, ppParameter, 
ppDrwCmd, ppDevice,
  ppDesignLayer;

type
  TmyDrillDownDraw = class(TppDrawShape)
  private
    FKeyValue: Variant;
  protected
  public
    procedure Assign(Source: TPersistent); override;
    function EqualTo(aDrawCommand: TppDrawCommand): Boolean; override;
  published
    property KeyValue: Variant read FKeyValue write FKeyValue;
  end;

  TForm3 = class(TForm)
    Report: TppReport;
    ppHeaderBand1: TppHeaderBand;
    ppDetailBand1: TppDetailBand;
    ppFooterBand1: TppFooterBand;
    ppDBText1: TppDBText;
    dsCustomer: TDataSource;
    tblCustomer: TTable;
    plCustomer: TppDBPipeline;
    Button1: TButton;
    Memo1: TMemo;
    ppDesignLayers1: TppDesignLayers;
    ppDesignLayer1: TppDesignLayer;
    //procedure ppDBText1DrawCommandCreate(Sender, aDrawCommand: TObject);
    //procedure ppDBText1DrawCommandClick(Sender, aDrawCommand: TObject);
    procedure Button1Click(Sender: TObject);
    procedure ppDetailBand1BeforeGenerate(Sender: TObject);
  private
    procedure CreateDrawCommand;
    procedure DrawClickEvent(Sender: TObject);
    //procedure DrawClickEvent(Sender, aDrawCommand: TObject);
    { Private declarations }
  public
    { Public declarations }
  end;


  {TmyCustInfo
    This class is used to store customer information for each draw command}
  {TmyCustInfo = class(TComponent)
    private
      FCustNo: Integer;
      FCountry: String;
    public
      constructor CreateCustInfo(aOwner: TComponent; aCustNo: Integer; 
aCountry: String); virtual;

      property CustNo: Integer read FCustNo;
      property Country: String read FCountry;
    end;}


var
  Form3: TForm3;

implementation

{$R *.DFM}

{constructor TmyCustInfo.CreateCustInfo(aOwner: TComponent; aCustNo: 
Integer; aCountry: String);
begin
  inherited Create(aOwner);

  FCustNo  := aCustNo;
  FCountry := aCountry;
end;}

procedure TForm3.Button1Click(Sender: TObject);
begin
  Report.Print;
end;

{procedure TForm3.ppDBText1DrawCommandCreate(Sender, aDrawCommand: TObject);
var
  lCustInfo: TmyCustInfo;
begin
  lCustInfo := TmyCustInfo.CreateCustInfo(Self, plCustomer['CustNo'], 
plCustomer['Country']);

  TComponent(aDrawCommand).Tag := Integer(lCustInfo);
end;}

procedure TForm3.ppDetailBand1BeforeGenerate(Sender: TObject);
begin
  CreateDrawCommand;
end;

procedure TForm3.CreateDrawCommand;
var
  ADraw: TmyDrillDownDraw;
begin
  ADraw := TmyDrillDownDraw.Create(Report);
  ADraw.Clickable := True;
  ADraw.Page := Report.Engine.Page;
  ADraw.Band := Report.DetailBand;
  ADraw.Top := Report.DetailBand.PrintPosRect.Top + 500;
  ADraw.Left := Report.PrinterSetup.PageDef.mmMarginLeft;
  ADraw.Width := Report.PrinterSetup.PageDef.mmPrintableWidth;
  ADraw.Height := Report.DetailBand.mmHeight - 1000;
  ADraw.Pen.Style := psClear;
  ADraw.Brush.Style := bsClear;
  ADraw.OnClick := DrawClickEvent;
  ADraw.KeyValue := plCustomer['CustNo'];
end;

procedure TForm3.DrawClickEvent(Sender: TObject);
begin
  ShowMessage('CustNo: ' + TmyDrillDownDraw(Sender).KeyValue);
end;

{procedure TForm3.ppDBText1DrawCommandClick(Sender, aDrawCommand: TObject);
var
  lCustInfo: TmyCustInfo;
  lsCustNo: String;
begin
  lCustInfo := TmyCustInfo(TComponent(aDrawCommand).Tag);

  lsCustNo := IntToStr(lCustInfo.CustNo);

  ShowMessage('CustNo: ' + lsCustNo + #13#10 +
              'Country: ' + lCustInfo.Country) ;

end;}


{ TmyDrillDownDraw }

procedure TmyDrillDownDraw.Assign(Source: TPersistent);
begin
  inherited Assign(Source);

  if not(Source is TmyDrillDownDraw) then
    Exit;

  FKeyValue := TmyDrillDownDraw(Source).KeyValue;
end;

function TmyDrillDownDraw.EqualTo(aDrawCommand: TppDrawCommand): Boolean;
begin
  Result := inherited EqualTo(aDrawCommand);

  if aDrawCommand is TmyDrillDownDraw then
    Result := Result and (FKeyValue = 
TmyDrillDownDraw(aDrawCommand).KeyValue);
end;

initialization
  RegisterClasses([TmyDrillDownDraw]);

finalization
   UnRegisterClasses([TmyDrillDownDraw]);

end.
 
]]>
        </description>
    </item>
   </channel>
</rss>
