Board index » delphi » QuickReport QRDBText with OnClick event handler?

QuickReport QRDBText with OnClick event handler?

How can I add an OnClick event handler to a QRDBText component.  Is this
possible without modifying the original source?  Or, is there a 3rd
party component to do this task under QuickReport?

Sincerely,
Marlon

 

Re:QuickReport QRDBText with OnClick event handler?


Marlon

This example is tested with Delphi4 (I don't know wheather it will work
in Delphi3).

TMYQRDBText = class(TQRDBText)
published
   property OnClick;
end;

Sincerely,
Alex Ivanenko,
Project-Info,
web: http://www.project-info.all.ru/pisoft
mailto:a...@akin.ru

Quote
Marlon D. Gallego wrote:

> How can I add an OnClick event handler to a QRDBText component.  Is this
> possible without modifying the original source?  Or, is there a 3rd
> party component to do this task under QuickReport?

> Sincerely,
> Marlon

Re:QuickReport QRDBText with OnClick event handler?


Quote
Alex Ivanenko wrote:
> Marlon

> This example is tested with Delphi4 (I don't know wheather it will work
> in Delphi3).

> TMYQRDBText = class(TQRDBText)
> published
>    property OnClick;
> end;

> Sincerely,
> Alex Ivanenko,
> Project-Info,
> web: http://www.project-info.all.ru/pisoft
> mailto:a...@akin.ru

> Marlon D. Gallego wrote:

> > How can I add an OnClick event handler to a QRDBText component.  Is this
> > possible without modifying the original source?  Or, is there a 3rd
> > party component to do this task under QuickReport?

> > Sincerely,
> > Marlon

Re:QuickReport QRDBText with OnClick event handler?


The details of creating and installing of new components in the Delphi
IDE are described in the on-line Help ("Creating custom omponents /
Making components available at design time" topic).
The basic steps are the following:
1) Create new Unit and write the code which I've showed in the interface
part of the unit.
2) Write Register procedure to register the component.
3) Create new Package, add this unit to it, compile package and install
it to the IDE.
After this You will see new component in the Components palette. Drop it
to Your report and You will see OnClick event in the Object Inspector.

Sincerely,
Alex Ivanenko,
Project-Info,
web: http://www.project-info.all.ru/pisoft
mailto:a...@akin.ru

Quote
Marlon D. Gallego wrote:

> Alex Ivanenko wrote:

> > Marlon

> > This example is tested with Delphi4 (I don't know wheather it will work
> > in Delphi3).

> > TMYQRDBText = class(TQRDBText)
> > published
> >    property OnClick;
> > end;

> > Sincerely,
> > Alex Ivanenko,
> > Project-Info,
> > web: http://www.project-info.all.ru/pisoft
> > mailto:a...@akin.ru

> > Marlon D. Gallego wrote:

> > > How can I add an OnClick event handler to a QRDBText component.  Is this
> > > possible without modifying the original source?  Or, is there a 3rd
> > > party component to do this task under QuickReport?

> > > Sincerely,
> > > Marlon

Re:QuickReport QRDBText with OnClick event handler?


I have successfully made the custom component but the Onclick event still doesn't
work when I ran the report.  What is the problem?

Sincerely,
Marlon D. Gallego

Re:QuickReport QRDBText with OnClick event handler?


Marlon

I have a guess about why it doesn't works: initially I didn't understood
Your question right.
Now I think that You want to run report's Preview and in the preview
form click on the text rendered by the control to trigger OnClick event.
If this is a case I'm sorry for Your useless spent time - I have know
answer to this question. I've thought that You need to trigger OnClick
event when showing the report's layout but not the report's output.

If my guess is not right then we can continue because it works at me. In
this case I need some additional info about what You do.

Sincerely,
Alex Ivanenko,
Project-Info,
web: http://www.project-info.all.ru/pisoft
mailto:a...@akin.ru

Quote
Marlon D. Gallego wrote:

> I have successfully made the custom component but the Onclick event still doesn't
> work when I ran the report.  What is the problem?

> Sincerely,
> Marlon D. Gallego

Re:QuickReport QRDBText with OnClick event handler?


Alex:

Your guess was right!  I need to trigger an OnClick event on a text output rendered by
a TQRDBText upon running a reports preview.  So, what will I do next?

Marlon

Other Threads