ASP call Crystal and Store Procedure (2)

Source: Internet
Author: User
Tags variables
' Activexpluginviewer.asp

<title>seagate the Viewer plug-in</title>
<body bgcolor=c6c6c6>
<p align= "center" >
<script language= "JavaScript" >
Document.writeln (' <embed name= ' "Startup");
Document.writeln (' type=application/x-ssreportviewer-plugin;version=8.0.0.2 ');
Document.writeln (' width=100% ');
Document.writeln (' height=100%% ');
Document.writeln (' pluginspage= "/viewer/activexviewer/get-npviewer.htm");
Document.writeln (' param_url= "rptserver.asp");
Document.writeln (' param_enableexportbutton= ' true ');
Document.writeln (' param_enablehelpbutton= ' false ');
Document.writeln (' param_displaygrouptree= ' true ');
Document.writeln (' param_displaytoolbar= ' true ');
Document.writeln (' param_enablegrouptree= ' true ');
Document.writeln (' param_enableprintbutton= ' true ');
Document.writeln (' param_enablerefreshbutton= ' false ');
Document.writeln (' param_enablezoomcontrol= ' true ');
Document.writeln (' > ');
Document.writeln (' </EMBED> ');
</script>
</p>
</body>

' Alwaysrequiredsteps.asp

<%
'=================================================================
' This file is the ALWAYS REQUIRED STEPS for using the automation
' Server
'

'===================================================================================
' Create the Crystal Reports Objects
'===================================================================================
'
' You'll notice that's Crystal Reports objects are scoped as session variables.
' This is because the page ' demand processing be performed by a prewritten
' ASP page called ' rptserver.asp '. In Allow rptserver.asp easy access
' To the Crystal ' objects, we scope them as session variables. That way
' Any ASP page running in this session, including rptserver.asp, can use them.


'-1-
' CREATE the application OBJECT '
If not IsObject (session ("Oapp")) Then
Set session ("oapp") = Server.CreateObject ("Crystalruntime.application")
End If

' This ' if/end if ' structure are used to create the Crystal Reports application
' Object only once the session. Creating the Application Object-session ("Oapp")
' Loads the Crystal the Component Automation server (Craxdrt32.dll) into memory.
'
' We create it as a Session variable the ' duration of the '
' ASP session. This is to elimainate the overhead of loading and unloading the
' Craxdrt32.dll in and out of memory. Once the Application object is created in
' Memory for this session, you can run many reports without has to recreate it.


'-2-
' CREATE the ' OBJECT
'
' The created by calling of the Application object ' OpenReport method.

Path = Request.ServerVariables ("path_translated")
while (right (path, 1) <> "\" and Len (path) <> 0)
Ilen = Len (Path)-1
Path = Left (path, Ilen)
Wend

' This ' while/wend ' loop are used to determine the physical path (eg:c:\) to the
' Crystal ' file by translating the URL virtual path (eg:http://domain/dir)



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.