Home Server

Trying to set autosearch parameters in a report w/ subreports

edited April 2003 in Server
Hi all,

I written a report that has two subreports in the detail band. I
loaded the first subreport with a report I had created previously.
This report has three autosearch parameters. The second subreport has
no parameters. Finally, I published this report to my intranet using
rbserver and isapi. With my webtier I have a custome autosearch web
page that accepts values for the three autosearch parameters. When
the form is submitted I recieve a http 500 - internal server error.

After doing some debugging I was able to determine the problem occurs
when I'm trying to set the autosearch values. The following is the
code I use to set the values in the webtier:

//get the autosearch parameters from the server, if necessary
if (aWebRequest.AutoSearchParameters.Count = 0) then
rsWebTier1.GetAutoSearchParameters(aWebRequest);

//apply the autosearch values entered by the user
if (aWebRequest.AutoSearchParameters.Count > 0) then
begin
aWebRequest.AutoSearchParameters[0].Fields[0].SearchExpression
:= lsShopName;
aWebRequest.AutoSearchParameters[0].Fields[1].SearchExpression
:= lsFleetGroup;
aWebRequest.AutoSearchParameters[0].Fields[2].SearchExpression
:= ShopType;
end;


Am I not accessing the autosearch group properly? Do you have any
examples of setting autosearch parameters in subreports?

Thanks,

Mike Dannenbring

Comments

  • edited April 2003

    Try performing some incremental tests:

    1. Does the report work properly in a standard application?
    2. Does the report work properly in a server application when accessed via
    the ClientReport?
    3. Does the report work properly in a server application when accessed via
    the WebTier and using the built-in auto-search page support?

    In your code below, check the values of
    aWebRequest.AutoSearchParameters.Count and
    aWebRequest.AutoSearchParameters[0].FieldCount

    AutoSearch parameters are associated with Query DataViews. If you have
    multiple Query DataViews associated with the report, then their may be
    multiple AutoSearch groups.

    If you would like to create a simple example, try modifying one of our demos
    and then send it to me in .zip format.


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2003
    Thanks.

    I was spending all that time debugging the wrong report. Thanks again for
    the help.

    Mike Dannenbring.
    Metro-North Railroad

This discussion has been closed.