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

Re: Parameters for user specific reports

edited May 2003 in End User
>Nico Cizik (Digital Metaphors) wrote:

OK, I'm getting VERY close to a solution here. It seems like the above
would be wasting my time a little bit - since there is already a RAP
method of the report object called CreateAutoSearchCriteria. So I just
added a Rap function GetUserProperty(aPropertyName): Variant, and I'm
using this as follows:

procedure ReportOnAutoSearchDialogClose;
begin
Report.CreateAutoSearchCriteria(
'mfContacts',
'OwnerId',
soEqual,
IntToStr( GetUserProperty('Id') ),
False
);
end;

This works great, as long as there are some autosearch fields defined
for the report - otherwise it doesn't get called...

What RAP event should I place this RAP code in? It has to be after the
AutoSearchDialog is shown, but before the SQL for the datapipelines gets
created....


Best Regards,

James Crosswell
Software Engineer
Microforge.net Limited
http://www.microforge.net

Comments

  • edited May 2003
    James,

    Try using the GlobalOnCreate event. This event fires just after the
    GetAutoSearchValues event fires but is the very first event fired if no
    autosearch criteria is defined.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2003
    Hi Nico,

    I don't see any such event. Are you sure that such an event exists in RAP?

    Best Regards,

    James Crosswell
    Software Engineer
    Microforge.net Limited
    http://www.microforge.net

  • edited May 2003
    Hi James,

    You can access the GlobalOnCreate event by right clicking in the "Module
    View" window and selecting the "Module" option. Then click on the icon in
    the tree structure that reads "Events". You will then see the
    GlobalOnCreate and GlobalOnDestroy events in the window on the right. All
    of this is done in the Calc tab of the Report Designer.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited May 2003
    Perfect - Thanks Nico!

This discussion has been closed.