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

Calling a RBServer report from a IntraWeb app

edited January 2004 in Server
Hi!

I'm building a web application using IntraWeb and in this app I have to call
a ReportBuilder report.
This report will be in an server application and a WebTier will provide the
access to the web browser.

For now, in my tests, this report will receive no params from the web app
(but soon I'll add something like that).

So, in this web app I have a Button that will call the report.
In a test I've done the following code on OnClick event of the Button :

AddToInitProc('NewWindow(''' +
'http://localhost/Test3/ServerReportWebTier.dll?content=viewer&volume=Report
s&name=ActivitiesAreas&folder=v0&zoom=100'', ''MyWindow'', '''');');

this code above is a Javascript code that will open a new browser window
with the URL passed.

Note that I don't pass a SessionID.
As far as I know, the SessionID is not mandatory and I know the overhead
that will result from many calls.

So, I think a better idea would be call the report passing a SessionID.
But how can I do that ? (I don't know how to get one, maybe there's a method
that opens a
Session and return its ID :-)

One more thing :
In my test I have a normal Delphi app as the report server, then I have an
ISAPI dll as the WebTier and the web application built in IntraWeb.
Every time I call the URL above in Internet Explorer I get this error msg
"Cannot open file "c:\aaaaaa\LogFiles\rbServerLog20040129.xml. The file is
already been used by another process".

Why is this happening ? What am I missing ?

TIA (so much :-)

Jose Carlos
Brazil

Comments

  • edited January 2004

    Try the following....

    ---------------------------------------------------
    Tech Tip: Start a new Web Session
    ---------------------------------------------------

    The following example shows how to ask the global WebSessionManager to
    create a new session. This results in the aWebRequest.SessionID being
    assigned.


    uses
    rsWebSessionManager;


    procedure TWebModule1.WebModule1waDefaultAction(Sender: TObject; Request:
    TWebRequest; Response: TWebResponse; var Handled: Boolean);
    var
    lWebRequest: TrsWebRequest;
    begin

    {use the incoming request parameters to create a TrsWebRequest}
    lWebRequest := rsWebTier1.CreateWebRequest(Request.QueryFields,
    Request.Content);

    {get the web session, this will create a new session if needed}
    if not rsWebTier1.SessionExists(aWebRequest) then
    gWebSessionManager.GetSessionForRequest(lWebRequest);


    ShowMessage(aWebRequest.SessionID);



    end;

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

    Best regards,

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

    Your problem with the web log sounds like you have two webtier applications
    running. Perhaps a web debugger app and an ISAPI app? Reboot the machine and
    then try testing one app at a time.


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2004
    Where does that "Start a new Web Session" come from?
    There is not such a content in Tech tip newsgroup?
    Can you explain?
    THX
    Benjaimin

  • edited February 2004

    I wrote this article in response to this question. The type of code shown
    below is implemented in the RBServer\Demos\WebTier\Custom Parameters demo.
    See the commented code and ReadMe.doc for this example.


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

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited February 2004
    Ok!
    I thought that there is a group "tech tips" and I cennot see it!
    ;-)
    THX!

    Benjamin

This discussion has been closed.