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

RB 9 - BeforeAutoSearchDialogCreate fires different to RB 7

edited January 2005 in RAP
Using RB 7 I coded the BeforeAutosearchDialogCreate like this:

...
Report.AutoSearchFields[0].SearchExpression:=DateToStr(Now);
...

I used to Preview the Report and then hitting print. If the user enterd
another date in the AutoSearchFields Previw and Print gave the same reprot.

With RB 9 the events fires on Print too, thus resetting the value the user
entered.

Is this WAD? Am I missing some documentation? What event must I move my code
to? Why was this changed - I have to rework a lot a reports now.

Bernd

Comments

  • edited January 2005

    1. It was not our intent to change this behavior. Please send a request to
    support@digital-metaphors.com and we can send you a patch for RB 9.01.

    2. A work around without applying a patch, would be to add a check in your
    event-handler

    if Report.ShowAutoSearchDialog then
    Report.AutoSearchFields[0].SearchExpression:=DateToStr(Now);



    --
    Nard Moseley
    Digital Metaphors Corporation
    www.digital-metaphors.com



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited January 2005
    Nard,

    thanks for the answer. In the meantime I redid the reports and added a
    check, similar to what you proposed.

    BTW: Why not release the patches either on the DM homepage or in the NGs on
    a regular basis?

    brgds
    Bernd

This discussion has been closed.