My customer wants to create parameterized query in Query designer. Let say: "Select * from Table where InvDate=:Date". But I could find the way how to create the list of Parameters. Any advices would be appreciated.
By the way, can I some how get access to that Search window programmatically? Or some how setup those parameters in a code? The problem is that we have s/w "Scheduler" which allows to auto run (print, preview) any customer generated reports and manually modifiable list of parameters is not a very convenient way for our purposes. Any suggestions...
You can get access to the AutoSearch dialog using the Report.AutoSearchDialog property.
Take a look at the AutoSearch demos located in the \RBuilder\Demos\3. AutoSearch\... directory. These will give you a good example of what can be done. Also, since you are using the query designer and possibly RAP, you may want to consider upgrading to RB 9.02. This version contains the SQLBuilder object which makes the task of adding and editing autosearch criteria created in DADE very simple.
Comments
----------------------------------------------------
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.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
By the way, can I some how get access to that Search window
programmatically? Or some how setup those parameters in a code? The problem
is that we have s/w "Scheduler" which allows to auto run (print, preview)
any customer generated reports and manually modifiable list of parameters is
not a very convenient way for our purposes. Any suggestions...
We use RB 7.04
Best regrds
Michael
You can get access to the AutoSearch dialog using the
Report.AutoSearchDialog property.
Take a look at the AutoSearch demos located in the \RBuilder\Demos\3.
AutoSearch\... directory. These will give you a good example of what can be
done. Also, since you are using the query designer and possibly RAP, you
may want to consider upgrading to RB 9.02. This version contains the
SQLBuilder object which makes the task of adding and editing autosearch
criteria created in DADE very simple.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com