Dynamic Web Page / Site - HELP (long - with examples) 
Author Message
 Dynamic Web Page / Site - HELP (long - with examples)

It has been years since I've written code.

I have a front page web site where users access reports.  These reports are automatically generated by workstations, scheduled
processes, and our mainframe.  They're FTP'd or written to a directory structure.

As it stands, I have directory browsing enabled.  This permits the "registerd" type documents (XLS files, DOC files, etc) to be
displayed in the browser when the user clicks the files.

I've got a new class of reports comming on line.  I've also got an OCX file that will display them in the browser - thus eliminating
the need for 900 copies of Crystal Reports!.  My problem is that to make this work I have to make a web page for each report-name.

This is the HTML/VBScript for a sample report:

<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Crystal Viewer Test</title>

<body language="vbscript" onload="RunReport">
<OBJECT classid="clsid:CA281D3B-CA98-11CF-9570-00AA0018EA26"
CODEBASE="http://hiatlpsweb/pswebtest/crystalview/crviewx.cab#Version=4,5,0,1" Id="CR1" Align="TEXTTOP" width="100%" Height="98%"
Hspace="0" Vspace="0" bgcolor="#FFFFFF" link="#006600" vlink="#669966" alink="#990000">

</object>
<script Language="vbscript">
sub RunReport
        CR1.showerrors 1
        CR1.ReportFileName="http://hiatlpsweb/pswebtest/crystalview/file11.rpt"
        CR1.Action=1
end sub
</script>
</body </html>
****************************

NOW, I've modified the HTML to get the report name from a function (but this is pretty much the extent of my skill!) and to
authenticate the user (stolen from MS examples...):

****************************
<html>

<head>
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>Crystal Viewer Test 4</title>
<%
Response.Clear
Response.Buffer = True
Response.Status = "401 Unauthorized"
Response.AddHeader "WWW-Aughenticate","NTLM"
Response.End
%>
<script Language="vbscript">
Function RptName(FName)
        RptName="http://hiatlpsweb/pswebtest/crystalview/apydtl_run1.rpt"
End function
</script>
</head>
<Body>
<body language="vbscript" onload="RunReport">
<OBJECT classid="clsid:CA281D3B-CA98-11CF-9570-00AA0018EA26"
CODEBASE="http://hiatlpsweb/pswebtest/crystalview/crviewx.cab#Version=4,5,0,1" Id="CR1" Align="TEXTTOP" width="100%" Height="98%"
Hspace="0" Vspace="0" bgcolor="#FFFFFF" link="#006600" vlink="#669966" alink="#990000">

</object>
<script Language="vbscript">
sub RunReport
        CR1.showerrors 1
        FName=RptName(FName)
        CR1.ReportFileName=RptName(FName)
        CR1.Action=1
end sub
        </script>

</body>
</html>

*********************
There is probably some code here that is not necessary as well.

What I want to do is:
        1- Do a directory on the target DIR and enumerate all the subdirectories (these will be named MMDDYYYY - 02011999 or FEB
1999, depending on the users requirement.)
        2- Create buttons in a left frame for each of those directories (labled).
        3- When a button is clicked, enumerate the reports in the directories - perhaps into a list box in a bottom frame.  When a
listed item is clicked, the file name is assigned to the report name and CR1 object is run and displayed in the main window.

CAN YOU HELP???

BigJohn

You know what to cut!!



Tue, 31 Jul 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Dynamic web site / page - (long - with examples) PLEASE HELP!

2. How to divide long web page into specific size page

3. Web page contains script that takes an unusually long time to run

4. FYI - New Web Site Security Issue - Cross Site Scripting Vulnerability

5. FYI - New Web Site Security Issue - Cross Site Scripting Vulnerability

6. FYI - New Web Site Security Issue - Cross Site Scripting Vulnerability

7. PLease help with my web site

8. PLease help with my web site

9. Looking for a *GOOD* VB script and MSAccess Help Web Site

10. Web Site Help Needed

11. Help on Web site issues

12. Help with publishing a local web-site

 

 
Powered by phpBB® Forum Software