Home End User

Weird Issue when setting autosearch flag

edited March 2003 in End User
Hi,

V6.03 - this is the second time I've seen this now. When using a date as
search criteria and setting the autosearch flag to prompt the user, the
criteria gets ignored. While developing the report, if I go to preview and
press the criteria button, nothing happens. If the end-user runs the report
straight from the explorer, it does not prompt the user. When you go back
into the data definition the criteria is gone. If you create the criteria
again and save the report and then comeback in, the criteria is still in the
data definition, but as soon as you press the autosearch button in preview,
it disappears.

Both times if I start the report from scratch again, all seems to be fine
forever more. What would cause this sort of issue?

Regards

Alex

Comments

  • edited March 2003
    We have not heard of this behavior before. Can your test using RB 7.01? You
    shouldn't have to create teh report from scratch. What it could be is that
    you have Report.SaveAsTemplate set to true, so that the report, when it is
    saved, saves to a template file, when you have a report on a form that you
    are running and it doesn't use the template with the new autosearch criteria
    added. Can you make sure that this SaveAsTemplate property setting is false
    when you create, design and save a report?


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited March 2003
    Hi Jim,

    I cant test using 7.01 unless you were thinking of giving me a deal too hard
    to refuse :)

    SaveAsTemplate is False and always remains False, so this is not the
    problem. More investigation reveals that it is not limited to dates. I
    have tried even a simple report with only one criteria which requires user
    input, and when i choose preview in design mode and go back to data tab, it
    just removes the whole where clause from the SQL statement. It only happens
    if I choose to preview. If the report is previewed from explorer then this
    time it did display the criteria selection box, but ignored its values and
    printed everything anyway. No exceptions are reported by the debugger. At
    this point in time I can't do selection criteria at all. I'll keep looking,
    but any ideas would be appreciated. Any code that deletes the definition in
    certain circumstances?

    Regards

    Alex

    The SaveAsTemplate is false so that's not the issue
  • edited March 2003
    Just to add, I tried the following:

    Created a new report and data definition with search criteria and autosearch
    = True, display a field in design and then without previewing the report,
    saved it. Then if i preview report directly from explorer, it successfully
    asks for criteria and displays correct data. However, once I make changes
    in design and preview from the designer, it deletes the criteria from the
    SQL statement. It all appears to relate to some need to delete the
    criteria.

    I'm about as far as I can go at this stage.

    Regards

    Alex

  • edited March 2003
    OK, unsure why the inconsistency but I have found an errant
    FreeAutoSearchFields in the ReportBeforePrint method. I'm pretty sure this
    is the issue. Sorry for wasting your time.

    Regards

    Alex
This discussion has been closed.