Home General
New Blog Posts: Merging Reports - Part 1 and Part 2

Get value when user clicks on ppDBText on ppGroupFooterBand

edited November 2014 in General
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.

Comments

  • edited November 2014
    Hello,

    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;

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2014
    Thanks a lot. It works great. Sorry about the Name. I had to install
    "Windows Live Mail" in order to search and post on the NewsGroup. Haven't
    really configured it yet.

    Thanks again.
  • edited November 2014
    Is there a way, from this event, to know if the user used the Right or Left
    Mouse Button?
  • edited November 2014
    Please configure your newsreader client to post using your real name. :)


    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2014
    Hi Robert,

    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.

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.