Home End User

problem when click Cancel on the search dialog

edited November 2009 in End User
I have some 160+ report designs which present date ranges in AutoSearch
criteria. We have a customized search dialog, which uses a locally
customized between dates search panel.

On all but one of these reports, the dialog works just fine. Our custom
Valid routine in the panel handles Show All, and also handles the
result of a user populating only one of the date pickers before
clicking ok.

However, on that one report, an exception is thrown if Cancel is
clicked. The exception is also thrown on OK, in any case other than
both pickers being populated with good date strings.

The exception thrown is from this code:
procedure TppReport.DoOnAutoSearchDialogClose;
begin
if Assigned(FOnAutoSearchDialogClose) then
FOnAutoSearchDialogClose(Self);

SendEventNotify(Self, ciReportAutoSearchDialogClose, nil);

end;

The SendNotify is where the exception occurs. I have spent hours trying
to determine why this happens, but with no success.

The report in question appears to be the same in its definition of
AutoSearch criteria as any of the others. The code in Valid handles any
case other than two valid dates as though the checkbox for Show All
were checked. And in all those cases, in this one report, it fails to
work properly.

Any clues or suggesitons would be greatly appreciated.

Thanks,

--

Bill

Comments

  • edited November 2009
    Hi Bill,

    We have not seen this behavior before. I assume you have other reports that
    use a date range that do not experience this issue? If so, try to narrow
    down the difference between this report and others that do function
    correctly. Another option would be to try recreating the affected report
    from scratch to see if you can spot where the problem may be occuring.

    --
    Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com

    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
  • edited November 2009

    Also try adding RBuilder\Source to your Delphi library path. Then run the
    report using the debugger. When the exception occurs examine the call stack.
    Perhaps that will provide a clue.

    SendNotifiy is a generic notification method of the TppCommunicator class..
    Many of the RB classes descend from TppCommunicator. So that is not much of
    a hint, unfortunately.

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2009
    ?In the version we were using previously, this report still gave an error
    about being unable to run the ReportOnAutoSearchDialogClose. In 11.04, I
    see that error, AND the notify error. This is with the range selected as
    Mandatory. My original message was based on Show All. Rechecking the
    operation of the report in our prior release, I saw that it needs to be
    Mandatory.



    --- posted by geoForum on http://www.newswhat.com
  • edited November 2009
    Nico Cizik (Digital Metaphors) wrote:


    I have already spent much time looking for differences, and so far,
    nothing has become apparent. I will continue to try whatever occurs to
    me, and perhaps over the weekend will try to replicate the report, from
    scratch.

    --

    Bill
  • edited November 2009
    Nard Moseley (Digital Metaphors) wrote:


    Unfortunately, when the exception occurs, the call stack has in it only
    two entries. I had hoped it might lead to a solution, but it has not
    done so.

    I do have a little more to offer, and it may lead to something. I will
    try to run later and get a capture of the error dialog, so you can see
    it. I will hope that it may be more of a clue.

    --

    Bill
This discussion has been closed.