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

Changing parameter in RAP

edited November 2005 in RAP
Hi

Using RB 6.03 Delphi 5
I have a report with 2 queries. The one query (Query A) has an
autosearch parameter (Parameter A), the other also has a parameter (not
autosearch) (Parameter B).

What I need to do is
1. Open report, user fills in value for Parameter A
2. Run query A. (Query B also execute but doesn't return any values
because of the default value of the parameter - It would be better
(faster) if I can prevent Query B from executing initially, but don't
know how)
3. Get a value from query A, perform certain calculations on this
value (using a pass-through function),
4. Use the result of the pass-through function as the value of
Parameter B
5. Rerun Query B
6. Preview/Print the report

My problem is:
When (what event) to use - when is Query A (and B) completed
How do I get Query B to requery with the new parameter

Regards
Dir

Comments

  • edited November 2005

    Try using the Report.OnGetAutoSearchValues event. It fires after the user
    has entered the autosearch value and before the datapipelines have been
    opened.




    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2005
    Thanks, but I need an event that runs before the report display but
    after the datapipeline has been opened, as I need to use a result from
    the one pipeline to populate the parameter of the second pipeline, and
    then requery the second pipeline.

  • edited November 2005

    My thought was that you could use the OnGetAutoSearchValues event to open
    the first pipeline:

    myPipelineA.Open; // open first pipeline

    { add more code here..}






    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.