Changing parameter 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 .
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 completed
How do I get Query B to requery with the new parameter
Regards
Dir
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 .
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 completed
How do I get Query B to requery with the new parameter
Regards
Dir
This discussion has been closed.
Comments
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
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.
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