Home Server

Using EReportBuilderError

edited October 2003 in Server
Hello,

Can someone provide an example on how to use EReportBuilderError to keep my
ReportBilder Server application from shutting down when an access violation
occurs?

Occasionaly, for some strange reason, my RB Server application will throw an
Access Violation due to a web request from a WebTier com object. After it
throws the error, the whole rb server will lock up, and will require a
restart.

In a previous message thread, it was mentioned that EReportBuilderError
could be used to catch these errors, report them to the client, and the
server could stay up. I don't know where to begin to implement this
safeguard. Any assistance would be great!



I am using RB Server 7.02 with Delphi 6 SR2 on Windows 2000 Server SP3, with
a SQL Server 2000 backend (using a Report Explorer structure including a
report items and report folders tables).

Thanks in advance,
Clinton

Comments

  • edited October 2003

    Run the report server application under the Delphi debugger and determine
    the cause of the exception. In the debugger options set break on exceptions
    to true.

    The ReportBuilder code uses EReportBuilderError (and its descendants) to
    'raise' exceptions about error conditions that it encounters.

    The RB Server handles EReportBuilderError exceptions as "non fatal" error
    conditions. The server simply kills the offending session and thread.

    Other exceptions that occur are consider to be fatal to the server
    application.

    You can write code to in your reports to raise EReportBuilderError
    exceptions and to trapped other exceptions and re-raise them as
    EReportBuilderError.

    Here is an example taken from ppDBPipe.pas. The DBPipeline tries to open the
    dataset to which it is connected. If an error occurs, the exception is
    trapped and re-raised as EDataError. EDataError is a descendant of
    EReportBuilderError.

    if FOpenDataSource and (FDataLink.DataSet <> nil) then
    try
    FDataLink.DataSet.Open;
    except on E: Exception do
    raise EDataError.Create(E.Message);
    end;





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

    Best regards,

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

    But I realized today that my problem is not with the ReportBuilder Server,
    but it must be with my WebTier COM Server. Everything works fine, until the
    same report gets a request by 2 or 3 users simultaneously. When this
    happens, the COM Server seems to stop working and IIS must be restarted to
    get it working again. I also receive an error when I try to request a
    report after this happens: "Access Violation has occured in ntdll.dll"

    The server remains up though, because I can access it via thin-client
    application, and IIS remains working as well. I followed the directions for
    setting up a COM Server for WebTier. What could be my problem?

    I estimate that my application will have approximately 10+ users accessing a
    report at any point in time simultaneously. So I'm really worried!
    Any help is appreciated.

    Thanks again,
    Clinton





  • edited October 2003
    One more thing:

    This problem occurs with any report: it will occur when two different
    report requests are made, or the same report.

  • edited October 2003

    Have not had any other reports with this issue.

    Check that you have IIS configured as described in the RBServer\Demos\Web
    Tier\ASP\ReadMe.doc. The COM object should be loaded into memory once and
    should remain loaded at all times. It should run in the "high isolated"
    setting on IIS.

    Any code that you write for the WebTier application must be thread safe. I
    cannot determine whether you have custom code in your WebTier app, but if
    you do try creating a simpler test app that contain no custom webtier code.

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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited November 2003
    Hi Nard,
    sorry it took me so long to reply. I never could get my COM component to
    work properly after I implemented all of your suggestions. I converted the
    COM to a ISAPI dll and not had any problems since.

    Thanks,
    Clinton
This discussion has been closed.