Autosearch replacement
I know this has probably been asked a thousand times, and if there is a
thread already can someone point me in the right direction.
I have been using RB for a number of years (currently on 7). We have
implemented a end user solution and it works great.
I have just been asked to allow users to select search criteria from combo
box's etc rather than having to type in values on the autosearch default
forms.
Therefore I want to creat my own AutoSearch forms.
Is there any guidance on this?
I have my own reportexplorer and followed the guidance and that works great.
Sorry again in advance if this is somewhere in the help etc.
Cheers
Mark
thread already can someone point me in the right direction.
I have been using RB for a number of years (currently on 7). We have
implemented a end user solution and it works great.
I have just been asked to allow users to select search criteria from combo
box's etc rather than having to type in values on the autosearch default
forms.
Therefore I want to creat my own AutoSearch forms.
Is there any guidance on this?
I have my own reportexplorer and followed the guidance and that works great.
Sorry again in advance if this is somewhere in the help etc.
Cheers
Mark
This discussion has been closed.
Comments
Yes, it is fairly easy to replace the existing AutoSearch form with your own
custom ones. Take a look at the autosearch example located in the
\RBuilder\Demos\5. AutoSearch\4. Custom AutoSearch Dialog\... directory.
This example shows how to easily replace the existing dialog with one of
your own.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Thanks for that. I have found the demo.
Is there any guidance documentation as there is for creating a custom report
explorer.
I guess I also need to create a form for every report that we have. That is
a hell of a lot of reports.
Some more detailed advice would be great if you have the time
Cheers
Mark
You need to create a single custom autosearch dialog class that is
registered with ReportBuilder. It will be used for every report.
The AutoSearch dialog creates an AutoSearchPanel for each autosearch field
associated with the report.
A typical approach would be to create custom search panels that are used for
specific autosearch fields.
Open the RBuilder\Demos\AutoSearch\Custom AutoSearch Dialog example project.
Then open myASDialog.pas.
1. The TmyAutoSearchDialog class overrides a single method,
GetPanelClassForField.
The code for this method will use the custom TmySaleDateSearchPanel whenever
the fieldname is SalesDate and the operator is Between
example:
if (aField.FieldName = 'SaleDate') and (aField.SearchOperator = soBetween)
then
aPanelClass := TmySaleDateSearchPanel;
2. The TmySaleDateSearchPanel is a custom search panel that displays a
datetime picker.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com
there anything on how to accomplish the same for web-based reporting?
regards,
Martin
A different approach is required when using RB Server Edition to build web
applications. You have to take more manual control, you can retrieve the
autosearch paramters for the report and then display a custom web page that
you build.
See the following article and the examples that is describes.
-------------------------------------------------------
Tech Tips: RB Server and Custom Parameters
-------------------------------------------------------
The RBServer Custom Parameter demos show how to define custom session and
report level parameters that can be used to implement security and other
types of custom processing.
The are three projects that work together. Each project includes a
ReadMe.doc and commented code.
1. RBServer\Demos\Servers\Custom Parameters
2. RBServer\Demos\WebTier\Custom Parameters
3. RBServer\Demos\Clients\Custom Parameters
The demos include examples of how to...
1. Define Custom Session parameters.
A custom login form is displayed. Based upon the login, the catalog of
reports available to the user is filtered.
2. Define Custom Report parameters
A custom parameter form is displayed. The parameters are used by the report.
3. Custom AutoSearch form
A custom autosearch form is displayed. The parameter values are used by the
autosearch criteria.
--
Nard Moseley
Digital Metaphors Corporation
http://www.digital-metaphors.com\
Best regards,
Nard Moseley
Digital Metaphors
www.digital-metaphors.com