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

Detecting Zoom Change

edited September 2005 in Server
Hello

On one of my reports, at runtime, I modify the HTML generated by report
builder to put links around charts in my report, see my previous drill down
post.

This works fine, the problem I now have is that if my user changes the zoom
level of the report the html is regenerated. Is there a way that I can tell
this so that I can then put the links back into the new html that gets
generated?

The webtier does not go into the normal process request code when changing
the zoom percentage

Cheers

Paul

Comments

  • edited September 2005

    If the parameters passed to the webtier contain a 'zoom' parameter, then the
    local html page cache is cleared.

    The WebTier keeps a local cache of TppPage objects and a local cache of html
    pages. For a zoom request, the WebTier will delete the html page cache. If
    the TppPage object does not exist in its local cache, it will request it
    from the report server and add it to the cache. Finally the html page will
    be generated.


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


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2005
    Hi Nard

    Thanks for this info, but still am not sure how to do what I want to do

    I have set up a default action on my webtier which calls my ProcessResponse
    procedure. This procedure adds links into the generated html file

    My main question is where do I put code for putting these links back into
    the newly generated report html page after the cache has been cleared and
    the new report html page has been generated?

    Cheers

    Paul

  • edited September 2005
    Any ideas Nard?

  • edited September 2005


    A zoom command results in a new html page being requested. The request is
    sent to the web module/WebTier, just like all of the other requests. The
    request is for a specific page and contains a 'zoom' parameter. The html
    page is generated and returned by the WebTier.ProcessRequest method.

    To see the javascript that issues the request. Preview a report in a web
    browser and perform a View | Source on the toolbar frame.

    You can use the Delphi web app debugger to examine the request when it is
    sent to the webmodule and webtier.

    I think the zoom works much like the page navigation buttons.

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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2005
    Hi Nard

    I have never been able to debug my web application using the web debugger

    I sent you my webtier the other day, is there any chance that you could
    change it so that I can debug using the web app debugger?

    I dont know where to put the breakpoint within the web tier

    Cheers

    Paul




  • edited September 2005

    For an example of a using the WebDebugger see
    RBServer\Demos\WebTier\WebDebug. The example includes a ReadMe.doc. Open
    rbWebModule.pas and place a break point at the line

    Response.Content := rsWebTier1.ProcessWebRequest(Request.QueryFields,
    Request.Content);





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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2005
    hi Nard

    My webtier is a dll does this make a difference?

    Also, I notice that there are GUIDs within this demo program, how did they
    get there?

    Cheers

    Paul

  • edited September 2005
    I cant see how this got into the registry, is there a program I have to run
    to register my webtier?

  • edited September 2005

    1. Please read the Delphi docs on using the web debugger. They will explain
    to you that a web debugger application is a special type of application and
    how to convert between it and an ISAPI app. The GUIDS are part of the Web
    Debugger app - it uses COM. Again this is all Borlan technology, nothing we
    created.

    I think the simplest thing to do is to create two applications (one ISAPI,
    one WebDebugger) that both use the same WebModule.

    Also not that you have to configure the WebTier slightly differently for the
    Web Debugger app.

    2. The advantage of using the Web Debugger is that it enables you to use the
    Delphi debugger to trace your code. However, there are some errors that may
    encounter that occur only when you run an app as the ISAPI (particularly
    threading issue), since the environments are different.

    3. To debug an ISAPI app, I use CodeSite from Raize software.





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



    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2005
    Thanks Nard

    I will look into this

    I have CodeSite but for some reason the messages I send within the ISAPI app
    dont get picked up?

    Cheers

    Paul

  • edited September 2005
    Hi Nard

    Sorry but this one is really beginning to annoy me now!

    I still cannot get my webtier to debug through the debugger

    I have created a test application. This does sort of work but the problem I
    have now is that I cannot make any modifications to the html page because it
    does not exist and at the time of my code getting called all that is in the
    directory is a zoom file

    I have now tried to use the AfterProcessRequest event and this does not fire

    I just cant see why I am getting so much trouble wanting to do something so
    simple!

    What are the differences between the way that the web tier is configured for
    the ISAPI and web debugger app?

    Please help as I am losing a lot of valuable time on this now!

    Cheers

    Paul

  • edited September 2005

    The WebTier.WebModuleURI property value is different for the web debugger. I
    think that is the only difference.

    Open the the WebModules in the RBServer\Demos\WebTier\ISAPI and
    RBServer\Demos\WebTier\WebDebug to compare them.

    Try running the above demos, they both should work properly.


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


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited September 2005
    Hi Nard

    Another problem now

    I have finally managed to modify the html that is generated after the page
    has been zoomed

    For some reason the viewer does not show the charts as links? It is running
    exactly the same code as it does the first time

    I have viewed the source of the 0001.html file and it has link tags in

    Cheers

    Paul

  • edited September 2005
    Hi Nard

    I have just done view source on the page that has no links and it appears to
    be coming from a random filename?

    It appears as though even though I have added links into the 0001 file, it
    is not being looked at?
    Cheers

    Paul

  • edited September 2005

    If you would like to modify the RBuilder\Demos\WebTier\WebDebug project to
    show a simple example of what you are trying to implement, we can try to
    take a look at it here. Email in zip format to
    support@digital-metaphors.com.



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


    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
This discussion has been closed.