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

Count how many times a report runs

edited February 2005 in General
Hi!!

I would like to have a way to Count how many times a report runs, I need to
make an auditorship,
because I have a lot of reports and i think some are not processed to the
company?s final-users.

I would like to clean the system up

How can I make it?

Thanks.

Juli?o


ReportBuilder Entreprise Edition
Version 7.03

Comments

  • edited February 2005
    Hi Juli?o,

    How are these reports stored? Would you like to keep track of how many time
    each report is run in a database field, or in a local variable in Dephi?
    Are you loading templates using the ReportExplorer?

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2005
    Hi Nico!!

    We developing our own Explore, where templates are stored on a chart on our
    Oracle 9i server.

    I would like to keep track of how many times each report is run in our
    database field for statistic objectives.

    Thanks!!

    Juli?o

    Oracle 9i
    Delphi 5
    RBuilder Entreprise Edition 7.03
  • edited February 2005
    Hi Juli?o,

    My suggestion would be to use one of the Template events such as the
    OnLoadEnd event to access your dataset and update the field corresponding to
    the amount of times the given report was loaded. See the article below on
    activating and using the template events.

    ----------------------------------------------
    Tech Tip: Using Template Events
    ----------------------------------------------

    The Report.Template object has several events that can be used for
    customizing what happens when a report is loaded or saved:

    - OnLoadStart
    - OnLoadEnd
    - OnNew
    - OnSaveStart
    - OnSaveEnd


    The OnLoadEnd and OnNew events are often used to perform actions related
    to report and data initialization.

    The OnSaveEnd event is often used to save additional descriptive
    ("meta") data to the database each time the report is saved.

    Example:

    The Report.Template events are public and therefore must be assigned at
    run-time.


    1. In the private section of your form declaration you can declare an
    event-handler method:

    TForm = class(TForm)
    private
    procedure myTemplateOnLoadEndEvent(Sender: TObject);

    public

    end;


    2. In the Form.OnCreate event, you can assign the event-handler to the
    event:

    procedure TForm1.FormCreate(Sender: TObject);
    begin

    ppReport1.Template.OnLoadEnd := myTemplateOnLoadEndEvent;

    end;


    3. Implement the event-handler method:

    procedure TForm1.myTemplateOnLoadEndEvent(Sender: TObject);
    begin

    {add code here to initial the report or data, etc. }
    ppReport1.PrinterSetup.MarginTop := 0.5;

    end;


    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited February 2005
    Thanks Nico!!!

    Juli?o



This discussion has been closed.