Wrox Programmer Forums
|
Classic ASP Professional For advanced coder questions in ASP 3. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 16th, 2006, 11:50 AM
Registered User
 
Join Date: Oct 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Activate Crystal Report ActiveX viewer

As we all know Microsoft released IE browser security patch this year, users cannot directly interact with Microsoft ActiveX controls loaded by the APPLET, EMBED, or OBJECT elements. The solution is using Microsoft JScript to load controls from external script files. I tried this solution for Crystal Report Active X viewer, but no luck. Below is my code.

Report main page

**********************************************
<HTML>
<HEAD>
<TITLE>Seagate ActiveX Viewer</TITLE>

</HEAD>
<BODY BGCOLOR=C6C6C6 LANGUAGE=VBScript ONLOAD="Page_Initialize">
<div id="DivID">
<script src="createRptViewerExplicit.js"></script>


<SCRIPT LANGUAGE="VBScript">
<!--
Sub Page_Initialize
On Error Resume Next
Dim webBroker
Set webBroker = CreateObject("WebReportBroker.WebReportBroker")
if ScriptEngineMajorVersion < 2 then
window.alert "IE 3.02 users on NT4 need to get the latest version of VBScript or install IE 4.01 SP1. IE 3.02 users on Win95 need DCOM95 and latest version of VBScript, or install IE 4.01 SP1. These files are available at Microsoft's web site."
CRViewer.ReportName = "rptserver.asp"
else
Dim webSource
Set webSource = CreateObject("WebReportSource.WebReportSource")
webSource.ReportSource = webBroker
webSource.URL = "rptserver.asp"
webSource.PromptOnRefresh = True
CRViewer.ReportSource = webSource
end if
CRViewer.ViewReport
End Sub
-->
</SCRIPT>
</BODY>
</HTML>
*******************************************


external JS file:

*********************************************
var myObject = document.createElement('object');
DivID.appendChild(myObject);
myObject.ID="CRViewer";
myObject.width = "100%";
myObject.height = "95%";
myObject.CODEBASE="activexviewer.cab#Version=8,0,0 ,224";
myObject.classid= "CLSID:C4847596-972C-11D0-9567-00A0C9273C2A";
myObject.EnableRefreshButton = 0;
myObject.EnableGroupTree=0;
myObject.DisplayGroupTree = 0;
myObject.EnablePrintButton=1;
myObject.EnableExportButton = 0;
myObject.EnableDrillDown=0;
myObject.EnableSearchControl = 1;
myObject.EnableAnimationControl=1;
myObject.EnableZoomControl=2;
*************************************************


I use the similar code to make flash work, but not working for crystal report. Does anybody know how to make this work?

Thanks.

Wen







Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with crystal activex report viewer NagarajuK Crystal Reports 1 March 17th, 2008 06:57 PM
problem with crystal activex viewer in asp.net NagarajuK Crystal Reports 0 November 22nd, 2007 10:20 AM
asp.net with crystal activex viewer NagarajuK Crystal Reports 0 November 22nd, 2007 10:17 AM
Crystal Reports ActiveX Viewer omarmalik Crystal Reports 0 September 14th, 2006 05:39 AM
Help needed Crystal Reports ASP and ActiveX Viewer ros1188 Classic ASP Professional 17 January 28th, 2005 11:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.