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

Parameters - the final word?

edited August 2003 in General
I have noticed a few posts on the subject of parameterized queries, but I
haven't been able to follow many of the replies - so I hope you'll indulge
me with one last question (honest).

This is what I want to achieve:

1) At run time I want to pass a parameter through to the report
(ppReport.Parameters?).

2) I want the report 's query to use this parameter to grab one record. I
don't mind if this is via a RAP variable as long as it's accessible from
within the query.
E.g., on the query designer search tab: my_table.rec_no = :param_rec_no.

3) Although there should be no user intervention at runtime, obviously I
need to be able to specify the value at design time so I can preview the
report as I'm going along.

Want I don't want:

1) The user to enter the parameter at runtime.

2) For all (250,000) records to be dragged in and the filetered according to
the parameter.


Is this possible?

Comments

  • edited August 2003
    Hi Vince,

    You may want to try using AutoSearch Parameters rather than regular Report
    Parameters. Using AutoSearch parameters you can alter the displayed dataset
    information on the report. Autosearch can be set up in DADE or in Delphi
    code to filter almost any part of a dataset. See the AutoSearch demos in
    the \RBuilder\Demos\AutoSearch\... directory for examples. Also check out
    the article below on how to enable AutoSearch in DADE.



    ----------------------------------------------------
    Tech Tips: Creating AutoSearch parameters via DADE
    ----------------------------------------------------


    1. Access the Data workspace of the Report Designer.

    2. Create a DataView using the Query Wizard or Query Designer.

    2. A DataView tool window will be displayed in the data workspace.

    3. Press the Search button. The Search tab of the Query Designer will be
    displayed.

    4. Add a search criteria item and select the AutoSearch checkbox. You can
    optionally select Mandatory as desired.

    5. Close the query designer.

    6. Now when you select the Preview tab of the Report Designer. A search
    button will appear on the toolbar. This displays the AutoSearch dialog.

    7. By calling Report.Print in code, or by selecting print/preview from the
    report explorer the AutoSearch dialog will be automatically be displayed.


    --
    Best Regards,

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