Get value when user clicks on ppDBText on ppGroupFooterBand
I am hoping this is possible. I have a report which generates many pages. I
give the user the option of displaying Subtotals only in the form of a
checkbox on the form. When the user checks this checkbox, I regenerate the
report, but I only display subtotals from a ppGroupFooterBand. I want to be
able to have the user click on the ppDBText from the GroupBand, in this case
a category database value and then I want to grab the Text of that field so
I can regenerate the whole report but filter showing only rows that match
that category. Whew.
I hope that make sense. I am able to capture the click in a
OnDrawCommandClick event, but it always returns the text of the original
ppDBText that is in the Designer and not the actual text of the printed
value. Is there anyway to do this. I really didn't want to span a SubReport
as that makes no sense. I just want to regenerate the current report.
I am currently running Delphi 5 with 6.03 of Report Builder. If this
application was 20 years old, dependent on 20 years of 3rd party components
I would be glad to upgrade to a current version of ReportBuilder. But, I am
afraid that this app is going to die in Delphi 5.0. Thanks.
give the user the option of displaying Subtotals only in the form of a
checkbox on the form. When the user checks this checkbox, I regenerate the
report, but I only display subtotals from a ppGroupFooterBand. I want to be
able to have the user click on the ppDBText from the GroupBand, in this case
a category database value and then I want to grab the Text of that field so
I can regenerate the whole report but filter showing only rows that match
that category. Whew.
I hope that make sense. I am able to capture the click in a
OnDrawCommandClick event, but it always returns the text of the original
ppDBText that is in the Designer and not the actual text of the printed
value. Is there anyway to do this. I really didn't want to span a SubReport
as that makes no sense. I just want to regenerate the current report.
I am currently running Delphi 5 with 6.03 of Report Builder. If this
application was 20 years old, dependent on 20 years of 3rd party components
I would be glad to upgrade to a current version of ReportBuilder. But, I am
afraid that this app is going to die in Delphi 5.0. Thanks.
This discussion has been closed.
Comments
For future reference, please use your real name when posting to these
newsgroups.
How are you retrieving the DBText value? Inside the OnDrawCommandClick
event you will want to access the aDrawCommand parameter sent in.
Something like the following...
uses
ppDrwCmd;
procedure TForm1.ppDBText1DrawCommandClick(Sender, aDrawCommand: TObject);
var
lsValue: String;
begin
lsValue := TppDrawText(aDrawCommand).Text;
//Do something with the value here...
end;
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
"Windows Live Mail" in order to search and post on the NewsGroup. Haven't
really configured it yet.
Thanks again.
Mouse Button?
-
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
There is currently no way to determine the mouse button clicked using
the OnDrawCommandClick event of the report components. We will add this
to our possible list of enhancements for a future release.
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com