index | search | no replies | posting guidelines | help login | register
Index » Products » ASP Report Wizard v2
search this forum:
:: Knowing when a report is about to be displayed :: (6)Post a New Message | Post a Reply
Sep 16 2004, 6:49 AM
 Knowing when a report is about to be displayedPost a Reply
 scotthibbs

View this author's profile Send this author a private message

from: Philadelphia, PA

Thanks for the mod in .60 that allows me to change the headings on the builder page!

We were wondering if there is any way to know when a report is about to be displayed?.......by testing a request variable for instance.  I know you format javascript as part of your function.  Perhaps a hidden form variable could alert the ASP page that a report is about to be displayed.

We ask because we would like to embed your object in a <div> tag that is invisible until the page loads completely.  The displayed <div> will contain an "in progress" gif.  Some of your reports are very big and this would give the user a better experience.

Thanks for the great work on this tool.

Sep 16 2004, 9:58 AM
 Re: Knowing when a report is about to be displayedPost a Reply
 whichman

View this author's profile Send this author a private message Visit author's homepage

from: Laurel, MD

The easiest way to do this for now is to set your ASP buffer to false then call your script before the DisplayReports procedure. And example will be as follows:

<%
Response.Buffer = False
Dim objWiz, strConn
strConn = [Your Connection String]    
Set objWiz = Server.CreateObject("AspWebSolution.ReportWizard2")
With objWIz
    .HideProcedures = True
    .UsePopupFilters = True
    '.MaxRecords = 600
End WIth  

'Make sure you initialize before adding any HTML text
objWiz.Init(strConn)
%>

<html>
    <head>
        <title>My Repoprts</title>
    </head>
    <body scroll="auto">
        <img name="preload">
        <script>

            document.images["preload"].src="loading.gif";
        </script>
        <%        
            'put this where you want your reports
            objWiz.DisplayReports
        %>
        <script>
            document.images["preload"].src="pixel.gif";
        </script>
    </body>
</html>

<%    
Set objWiz = Nothing
%>


You can download both images from the links below:

http://www.cityjams.com/tmp/pixel.gif
http://www.cityjams.com/tmp/loading.gif

Note that this might reduce performance ...



-------------------------
Master of the Game
Sep 16 2004, 10:08 AM
 Re: Knowing when a report is about to be displayedPost a Reply
 scotthibbs

View this author's profile Send this author a private message

from: Philadelphia, PA

The problem with that is that it will display the loading gif when the object is NOT trying to produce a report....when it is actually producing the table selection page...which takes no time at all to display.

Am I not correct?

I think I would need to know only when it was about to produce a report...which takes the most time.

Sep 16 2004, 10:45 AM
 Re: Knowing when a report is about to be displayedPost a Reply
 ghost

View this author's profile Send this author a private message Visit author's homepage

from: Washington, DC

Try this before you display your report

<%
Dim bPreload

If Request.Form.Count>0 Then
    bPreload=True
Else
    If
Request.QueryString("rid")<>"" Then
        bPreload=True
    Else

        bPreload=False
    End If
End If

If
bPreload Then
    Response.Write("<script>document.images[""preload""].src=""loading.gif"";</script>")
End If

objWiz.DisplayReports

If bPreload Then
    Response.Write("<script>document.images[""preload""].src=""pixel.gif"";</script>")
End If

%>



-------------------------
Ghost
Sep 16 2004, 11:28 AM
 Re: Knowing when a report is about to be displayedPost a Reply
 scotthibbs

View this author's profile Send this author a private message

from: Philadelphia, PA

I think that might do it....Thanks.

I will confirm when I try it.

Sep 16 2004, 1:53 PM
 Re: Knowing when a report is about to be displayedPost a Reply
 scotthibbs

View this author's profile Send this author a private message

from: Philadelphia, PA

Yep......that worked just fine........thanks.

Pages: (1)   [1]

search this forum: