TECH TIP: ClientReport – Default AutoSearch Expression
The ClientReport.GetAutoSearchParameters method can be used to retrieve Report.AutoSearchFields[] fields from the report server. You can then assign the AutoSearchField.SearchExpression value and call the print method.
As an example, add the following code to the RBServer\Demos\Clients\ClientReport example.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
{----------------------------------------------------------} procedure TfrmClientReport.btnPrintClick(Sender: TObject); begin {set the volume and report name} rsClientReport1.VolumeName := 'Report Files'; rsClientReport1.ReportName := 'Customers\Orders\Order List'; {retrieve the autosearch paramters from the server and set the default search expression} if rsClientReport1.GetAutoSearchParameters then rsClientReport1.AutoSearchFields[0].SearchExpression := 'S'; rsClientReport1.Print; end; |