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

Empty AutoSearchFields - ReportClient and Web Tier

edited April 2003 in Server
I have several instances where I am displaying autosearch dialog boxes where
there are fields that have no default set, even though they are required
fields. I just do not have anything meaningful in these instances to default
to and the user is required to fill something in (a date for example).

The behavior with the ReportClient and the WebTier seem different from each
other and different from the behavior in the non-server version.

WebTier - If the values are not preset (in other words they are empty), I
seem to get a 'list index out of bounds' error and no dialog can be
displayed. The WebTier has a 'Search' button, not OK and Cancel as with the
ReportClient, and no means for changing your mind if you do not want to run
the report in question.

ReportClient - Cancel (or using the form's exit icon in the control bar)
causes the empty values to be sent to the Report Server. But this shouldn't
happen if the fields are required, should it? There are a couple of
interesting behaviors here that seem incorrect:

1. If there is a cancel button (or a means of cancelling) I would expect
that function to cancel the report request. It doesn't. Whatever values are
in the fields are sent to the server (empty values or provided values).

2. I have tried to change this behavior in code, thinking I could trap the
fact that the OK button has not been pressed. I can tell in the
OnAutoSearchDialogClose event that the result is not mrOK, but I cannot seem
to find a way to stop the report request. For example, I have tried
ReportClient1.Cancel, but the request is still processed by the server.

In the non-server version, if I use the Cancel button on the autosearch
dialog, then the expected behavior occurs, the processing of the report is
canceled.

Are you aware of any workarounds for this behavior? Do you expect this to
change? As always, thanks in advance for your help.

--
Bob McClintock

Comments

  • edited April 2003

    I just performed a test by creating a report on the customer table from
    DBDemos. I defined a search condition for the query and checked both
    AutoSearch and Mandatory. I did not specify a default value.

    On both the ClientReport and the WebTier a dialog is displayed that forces
    me to specify a value.

    There is a limitation when using the WebTier in that it does not provide a
    way to Cancel. An alternative is to use the Web Browser's "Back" button.

    The ClientReport AutoSearch dialog Cancel should not result in generation of
    the report. I have created a patch that corrects this. Please send an e-mail
    to support@digital-metaphors.com and we can send you the patch.



    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2003
    I looked into the 'List Index out of Bounds' error in the webtier.

    If I create a range entry of autosearch values using the soBetween search
    operator, set autosearch and mandatory, but leave the default values
    empty, I can reproduce the error. As it turns out, the reports I was
    writing all had date ranges as a part of their parameters.

    I also looked at the soInlist search operator as I suspected that it might
    behave similarly to the soBetween operator, but this does not create the
    same error.

    Curiously however, I also seem to be able to leave the List empty even
    though it is marked as required and am able to launch the report without
    entering any parameters to the list.

    Hope this helps.

    --
    Bob McClintock



  • edited April 2003

    Thanks for providing the additional information.

    Patches are now available the fix the issues related to the WebTier for
    cases in which Mandatory AutoSearch fields are specified in conjunction with
    the soBetween and InList operators and no initial values are provided. :)



    --
    Nard Moseley
    Digital Metaphors
    http://www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2003
    Thanks Nard, customer support for your terrific products has always been
    excellent and I appreciate the rapid turnaround.


This discussion has been closed.