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

Help, problems with autosearchvalues

edited November 2001 in General
Hello,

I'm having problems with Autosearchvalues and a report stored in the
database.
We have an autosearchvalue specified in the report called 'Boekjaar'.
The report is stored in the database.

We do the following:
if AstaClientDataSet1.Locate('Rapport_naam', 'Factuur', [loCaseInsensitive])
then begin
Rp_factuur.Template.LoadFromDatabase;
rp_factuur.Reset;
rp_factuur.Print;
end;
end;

We also have an event:
procedure TSc_facturatie_main.Rp_factuurGetAutoSearchValues(Sender:
TObject);
begin
if (Rp_factuur.AutoSearchFields[0].FieldName = 'Boekjaar') then
Rp_factuur.AutoSearchFields[0].SearchExpression := Sc_main.boekjaar;
end;

Problem is that the autosearch dialog is always shown, if we put the
property to true or false, it's always shown.
In the report we specified for the autosearchvalue 'Boekjaar' as autosearch
and not as autosearch, nothing helps.
The event GetAutoSearchValues is fired after the autosearch screen is shown.

Any help more than welcome,
Thanks,
Bernaert Dominique.

Comments

  • edited November 2001
    Hi Bernaert...

    Here is a common mistake that I did as well. I suppose you set your
    "ShowAutoSearchDialog" property before you load your template. The Template
    remembers these settings and overrides the ones currently set on your report
    component. Either edit your template and turn this feature off there, or if
    you want to make this a general thing, disable the AutoSearch Dialog after
    you loaded the template.

    Hope that helps, Marco...
    -------------------------------------------------------------------
    Marco Heine
    QUMAS
    Enterprise Compliance Management
    Visit our Website: www.qumas.com
  • edited November 2001
    Ok, thanks,
    that solved my problem.

    Dominique.

This discussion has been closed.